Skip to content

Commit

Permalink
Merge branch 'quentin/deprecateOldOidcFlow' into 'master'
Browse files Browse the repository at this point in the history
chore(core): deprecate old OIDC flow

See merge request TankerHQ/sdk-js!1026
  • Loading branch information
quentinvernot committed Jun 12, 2024
2 parents 251a829 + 6c78509 commit df9aa08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/core/src/LocalUser/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export type PassphraseVerification = { passphrase: string; };
export type E2ePassphraseVerification = { e2ePassphrase: string; };
export type KeyVerification = { verificationKey: string; };
export type OidcAuthorizationCodeVerification = { oidcProviderId: string; oidcAuthorizationCode: string; oidcState: string; };
/**
* @deprecated The entire OIDC flow has been reworked in version 4.2.0, "OidcVerification" has been deprecated as a result, use "OidcAuthorizationCodeVerification" instead
*/
export type OidcVerification = { oidcIdToken: string; };
export type PhoneNumberVerification = { phoneNumber: string; verificationCode: string; };
export type PreverifiedEmailVerification = { preverifiedEmail: string; };
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/Tanker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,17 @@ export class Tanker extends EventEmitter {
}
};

/**
* @deprecated The entire OIDC flow has been reworked in version 4.2.0, method "createOidcNonce" has been deprecated as a result
*/
createOidcNonce = async () => {
await this._initUnauthSession();
return this._unauthSession!.createOidcNonce();
};

/**
* @deprecated The entire OIDC flow has been reworked in version 4.2.0, method "setOidcTestNonce" has been deprecated as a result
*/
setOidcTestNonce = async (nonce: b64string) => {
await this._initUnauthSession();
await this._unauthSession!.setOidcTestNonce(nonce);
Expand Down

0 comments on commit df9aa08

Please sign in to comment.