Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixes broken workflows (Example Tests, AWS Edge function compatibility)
- Sets up workflow to run auth-react tests
- Updates test-servers to work with updated tests
- Fixes wrong types types from `string` to `number` on `createdAt`, `expiresAt` and `timeout` from the WebAuthn recipe
- Fixed `email` property by making it optional on `getGeneratedOptions` recipe implementation method

## [22.1.0] - 2025-04-04

Expand Down
14 changes: 7 additions & 7 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.

2 changes: 1 addition & 1 deletion lib/build/recipe/webauthn/recipeImplementation.js

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

22 changes: 11 additions & 11 deletions lib/build/recipe/webauthn/types.d.ts

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

2 changes: 1 addition & 1 deletion lib/ts/recipe/webauthn/recipeImplementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export default function getRecipeInterface(
return {
...resp,
user: new User(resp.user),
recipeUserId: new RecipeUserId(resp.recipeUserId),
recipeUserId: resp.recipeUserId ? new RecipeUserId(resp.recipeUserId) : undefined,
};
}

Expand Down
24 changes: 13 additions & 11 deletions lib/ts/recipe/webauthn/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ export type RecipeInterface = {
| {
status: "OK";
webauthnGeneratedOptionsId: string;
createdAt: string;
expiresAt: string;
createdAt: number;
expiresAt: number;
// for understanding the response, see https://www.w3.org/TR/webauthn-3/#sctn-registering-a-new-credential and https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential
rp: {
id: string;
Expand Down Expand Up @@ -246,8 +246,8 @@ export type RecipeInterface = {
| {
status: "OK";
webauthnGeneratedOptionsId: string;
createdAt: string;
expiresAt: string;
createdAt: number;
expiresAt: number;
challenge: string;
timeout: number;
userVerification: UserVerification;
Expand Down Expand Up @@ -348,7 +348,9 @@ export type RecipeInterface = {
token: string;
tenantId: string;
userContext: UserContext;
}): Promise<{ status: "OK"; user: User; recipeUserId: RecipeUserId } | GetUserFromRecoverAccountTokenErrorResponse>;
}): Promise<
{ status: "OK"; user: User; recipeUserId?: RecipeUserId } | GetUserFromRecoverAccountTokenErrorResponse
>;

removeCredential(input: {
webauthnCredentialId: string;
Expand Down Expand Up @@ -408,8 +410,8 @@ export type RecipeInterface = {
userVerification: UserVerification;
userPresence: boolean;
origin: string;
email: string;
timeout: string;
email?: string;
timeout: number;
challenge: string;
createdAt: number;
expiresAt: number;
Expand Down Expand Up @@ -498,8 +500,8 @@ export type APIInterface = {
| {
status: "OK";
webauthnGeneratedOptionsId: string;
createdAt: string;
expiresAt: string;
createdAt: number;
expiresAt: number;
rp: {
id: string;
name: string;
Expand Down Expand Up @@ -541,8 +543,8 @@ export type APIInterface = {
| {
status: "OK";
webauthnGeneratedOptionsId: string;
createdAt: string;
expiresAt: string;
createdAt: number;
expiresAt: number;
rpId: string;
challenge: string;
timeout: number;
Expand Down
Loading