File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -61,8 +61,14 @@ export class Auth {
6161 return new AuthPCKESession ( this , challenge , verifier ) ;
6262 }
6363
64- getToken ( code : string , verifier : string ) : Promise < TokenData > {
65- return this . _get < TokenData > ( `token` , { code, verifier } ) ;
64+ async getToken ( code : string , verifier : string ) : Promise < TokenData > {
65+ const tokenData = await this . _get < TokenData > ( `token` , { code, verifier } ) ;
66+ // n.b. Versions before v6 did not return the provider_id_token or identity_id
67+ return {
68+ ...tokenData ,
69+ identity_id : tokenData . identity_id ?? null ,
70+ provider_id_token : tokenData . provider_id_token ?? null ,
71+ } ;
6672 }
6773
6874 getWebAuthnSignupOptionsUrl ( email : string ) {
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ export interface TokenData {
7575 identity_id : string | null ;
7676 provider_token : string | null ;
7777 provider_refresh_token : string | null ;
78+ provider_id_token : string | null ;
7879}
7980
8081export type RegistrationResponse =
You can’t perform that action at this time.
0 commit comments