We are exploring your FirebaseAuthentication plugin, but we are missing the ability to retrieve the custom claims from the token.
The original firebase/auth contains a 'getIdTokenResult() : Promise' function that does return the user claims.
Implement the a way to retrieve the entire token like described in Additional context, or at least a possibility to return the custom claims.
No response
This is the firebase/auth IdTokenResult interface :
export declare interface IdTokenResult {
/**
* The authentication time formatted as a UTC string.
*
* @remarks
* This is the time the user authenticated (signed in) and not the time the token was refreshed.
*/
authTime: string;
/** The ID token expiration time formatted as a UTC string. */
expirationTime: string;
/** The ID token issuance time formatted as a UTC string. */
issuedAtTime: string;
/**
* The sign-in provider through which the ID token was obtained (anonymous, custom, phone,
* password, etc).
*
* @remarks
* Note, this does not map to provider IDs.
*/
signInProvider: string | null;
/**
* The type of second factor associated with this session, provided the user was multi-factor
* authenticated (eg. phone, etc).
*/
signInSecondFactor: string | null;
/** The Firebase Auth ID token JWT string. */
token: string;
/**
* The entire payload claims of the ID token including the standard reserved claims as well as
* the custom claims.
*/
claims: ParsedToken;
}
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too