Skip to content

Commit

Permalink
Add type fix for some other methods defined for webauthn
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30-st committed Dec 23, 2024
1 parent 06c468f commit f504ad3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
7 changes: 7 additions & 0 deletions lib/build/recipe/webauthn/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 12 additions & 7 deletions lib/ts/recipe/webauthn/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,13 @@ export default class RecipeWrapper {
| {
status: "OK";
user: User;
fetchResponse: Response;
}
| { status: "INVALID_CREDENTIALS_ERROR" }
| { status: "INVALID_CREDENTIALS_ERROR"; fetchResponse: Response }
| {
status: "SIGN_IN_NOT_ALLOWED";
reason: string;
fetchResponse: Response;
}
| GeneralErrorResponse
> {
Expand All @@ -231,6 +233,7 @@ export default class RecipeWrapper {
| {
status: "OK";
exists: boolean;
fetchResponse: Response;
}
| GeneralErrorResponse
> {
Expand Down Expand Up @@ -258,8 +261,9 @@ export default class RecipeWrapper {
}): Promise<
| {
status: "OK";
fetchResponse: Response;
}
| { status: "RECOVER_ACCOUNT_NOT_ALLOWED"; reason: string }
| { status: "RECOVER_ACCOUNT_NOT_ALLOWED"; reason: string; fetchResponse: Response }
| GeneralErrorResponse
> {
return Recipe.getInstanceOrThrow().recipeImplementation.generateRecoverAccountToken({
Expand Down Expand Up @@ -294,13 +298,14 @@ export default class RecipeWrapper {
status: "OK";
user: User;
email: string;
fetchResponse: Response;
}
| GeneralErrorResponse
| { status: "RECOVER_ACCOUNT_TOKEN_INVALID_ERROR" }
| { status: "INVALID_CREDENTIALS_ERROR" }
| { status: "GENERATED_OPTIONS_NOT_FOUND_ERROR" }
| { status: "INVALID_GENERATED_OPTIONS_ERROR" }
| { status: "INVALID_AUTHENTICATOR_ERROR"; reason: string }
| { status: "RECOVER_ACCOUNT_TOKEN_INVALID_ERROR"; fetchResponse: Response }
| { status: "INVALID_CREDENTIALS_ERROR"; fetchResponse: Response }
| { status: "GENERATED_OPTIONS_NOT_FOUND_ERROR"; fetchResponse: Response }
| { status: "INVALID_GENERATED_OPTIONS_ERROR"; fetchResponse: Response }
| { status: "INVALID_AUTHENTICATOR_ERROR"; reason: string; fetchResponse: Response }
> {
return Recipe.getInstanceOrThrow().recipeImplementation.recoverAccount({
...input,
Expand Down

0 comments on commit f504ad3

Please sign in to comment.