firebase / firebase/firebase-admin-go

feat: Add method to obtain ID Token using Refresh Token in Admin SDK

Open
#658 0 comments 1 reaction 0 assignees View on GitHub
api: auth
Dominant language
Go
Stars
1.3k
Forks
274
Avg merge
10h 39m
Merged PRs (30d)
2

Description

### [REQUIRED] Step 2: Describe your environment

* Operating System version: macOS Sonoma 14.5
* Firebase SDK version: v4.14.1
* Library version: v4.14.1
* Firebase Product: auth

### [REQUIRED] Step 3: Describe the problem

I am implementing authentication using Session Cookies following the documentation at https://firebase.google.com/docs/auth/admin/manage-cookies.

Since Session Cookies can only be valid for a maximum of 2 weeks, they need to be refreshed periodically. However, the SDK does not provide functionality to obtain an ID Token using a Refresh Token.

As an alternative, I've implemented a solution using the REST API described in https://firebase.google.com/docs/reference/rest/auth#section-refresh-token to refresh the token.
However, I believe having this functionality built into the SDK would be more convenient.

Would it be possible to add a feature to the SDK that allows obtaining an ID Token using a Refresh Token?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.