Skip to content

Commit 4a0901b

Browse files
committed
fix: temporarily set web-js version new version branch
1 parent a374016 commit 4a0901b

File tree

7 files changed

+25
-25
lines changed

7 files changed

+25
-25
lines changed

lib/build/recipe/webauthn/index.d.ts

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/webauthn.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/webauthnprebuiltui.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ts/recipe/webauthn/components/features/recoverAccountWithToken/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export const RecoverAccountUsingToken: React.FC<RecoverAccountWithTokenProps> =
131131

132132
// Use the register options to register the credential and recover the account.
133133
// We should have received a valid registration options response.
134-
const registerCredentialResponse = await props.recipe.webJSRecipe.registerCredential({
134+
const registerCredentialResponse = await props.recipe.webJSRecipe.createCredential({
135135
registrationOptions: registerOptions,
136136
userContext: props.userContext,
137137
});

lib/ts/recipe/webauthn/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -463,25 +463,25 @@ export default class Wrapper {
463463
return Webauthn.getInstanceOrThrow().webJSRecipe.removeCredential(input);
464464
}
465465

466-
static registerCredentialWithUser(input: {
466+
static createAndRegisterCredentialForSessionUser(input: {
467467
recipeUserId: string;
468468
email: string;
469469
options?: RecipeFunctionOptions;
470470
userContext: any;
471471
}): Promise<
472472
| { status: "OK" }
473473
| GeneralErrorResponse
474-
| { status: "REGISTER_CREDENTIAL_NOT_ALLOWED"; reason: string }
474+
| { status: "REGISTER_CREDENTIAL_NOT_ALLOWED"; reason?: string }
475475
| { status: "INVALID_EMAIL_ERROR"; err: string }
476476
| { status: "INVALID_CREDENTIALS_ERROR" }
477477
| { status: "OPTIONS_NOT_FOUND_ERROR" }
478478
| { status: "INVALID_OPTIONS_ERROR" }
479-
| { status: "INVALID_AUTHENTICATOR_ERROR"; reason: string }
479+
| { status: "INVALID_AUTHENTICATOR_ERROR"; reason?: string }
480480
| { status: "AUTHENTICATOR_ALREADY_REGISTERED" }
481481
| { status: "FAILED_TO_REGISTER_USER"; error: any }
482482
| { status: "WEBAUTHN_NOT_SUPPORTED"; error: any }
483483
> {
484-
return Webauthn.getInstanceOrThrow().webJSRecipe.registerCredentialWithUser(input);
484+
return Webauthn.getInstanceOrThrow().webJSRecipe.createAndRegisterCredentialForSessionUser(input);
485485
}
486486

487487
static registerCredential(input: {
@@ -493,11 +493,11 @@ export default class Wrapper {
493493
}): Promise<
494494
| { status: "OK" }
495495
| GeneralErrorResponse
496-
| { status: "REGISTER_CREDENTIAL_NOT_ALLOWED"; reason: string }
496+
| { status: "REGISTER_CREDENTIAL_NOT_ALLOWED"; reason?: string }
497497
| { status: "INVALID_CREDENTIALS_ERROR" }
498498
| { status: "OPTIONS_NOT_FOUND_ERROR" }
499499
| { status: "INVALID_OPTIONS_ERROR" }
500-
| { status: "INVALID_AUTHENTICATOR_ERROR"; reason: string }
500+
| { status: "INVALID_AUTHENTICATOR_ERROR"; reason?: string }
501501
> {
502502
return Webauthn.getInstanceOrThrow().webJSRecipe.registerCredential(input);
503503
}
@@ -532,7 +532,7 @@ const authenticateCredential = Wrapper.authenticateCredential;
532532
const registerCredentialWithSignUp = Wrapper.registerCredentialWithSignUp;
533533
const authenticateCredentialWithSignIn = Wrapper.authenticateCredentialWithSignIn;
534534
const registerCredentialWithRecoverAccount = Wrapper.registerCredentialWithRecoverAccount;
535-
const registerCredentialWithUser = Wrapper.registerCredentialWithUser;
535+
const createAndRegisterCredentialForSessionUser = Wrapper.createAndRegisterCredentialForSessionUser;
536536
const listCredentials = Wrapper.listCredentials;
537537
const removeCredential = Wrapper.removeCredential;
538538
const registerCredential = Wrapper.registerCredential;
@@ -553,7 +553,7 @@ export {
553553
registerCredentialWithSignUp,
554554
authenticateCredentialWithSignIn,
555555
registerCredentialWithRecoverAccount,
556-
registerCredentialWithUser,
556+
createAndRegisterCredentialForSessionUser,
557557
doesBrowserSupportWebAuthn,
558558
WebauthnComponentsOverrideProvider,
559559
listCredentials,

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"peerDependencies": {
102102
"react": ">=16.8.0",
103103
"react-dom": ">=16.8.0",
104-
"supertokens-web-js": "^0.15"
104+
"supertokens-web-js": "github:supertokens/supertokens-web-js#0.16"
105105
},
106106
"scripts": {
107107
"init": "bash ./init.sh",

0 commit comments

Comments
 (0)