Skip to content

Commit

Permalink
fix: add SessionPreBuiltUI into PreBuiltRecipes (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus authored Aug 23, 2024
1 parent c2190da commit 26c16df
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `redirectToFactorChooser` now accepts a `stepUp` option to set the `stepUp` query param.
- `redirectToFactor` now accepts a `stepUp` option to set the `stepUp` query param.

### Fixes

- Fixed an issue where the `Session` recipe was not allowed in the pre-built UI list (it's still a no-op, but it shouldn't be a type issue)

## [0.45.1] - 2024-08-09

### Changes
Expand Down
2 changes: 2 additions & 0 deletions lib/build/ui/types.d.ts

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

2 changes: 2 additions & 0 deletions lib/ts/ui/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { EmailPasswordPreBuiltUI } from "../recipe/emailpassword/prebuiltui
import type { EmailVerificationPreBuiltUI } from "../recipe/emailverification/prebuiltui";
import type { MultiFactorAuthPreBuiltUI } from "../recipe/multifactorauth/prebuiltui";
import type { PasswordlessPreBuiltUI } from "../recipe/passwordless/prebuiltui";
import type { SessionPreBuiltUI } from "../recipe/session/prebuiltui";
import type { ThirdPartyPreBuiltUI } from "../recipe/thirdparty/prebuiltui";
import type { TOTPPreBuiltUI } from "../recipe/totp/prebuiltui";

Expand All @@ -18,4 +19,5 @@ export type PreBuiltRecipes = (
| typeof EmailVerificationPreBuiltUI
| typeof MultiFactorAuthPreBuiltUI
| typeof TOTPPreBuiltUI
| typeof SessionPreBuiltUI
)[];
4 changes: 2 additions & 2 deletions test/with-typescript/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
EmailPasswordPreBuiltUI,
ResetPasswordUsingToken as EmailPasswordResetPasswordUsingToken,
} from "../../../recipe/emailpassword/prebuiltui";
import { AccessDeniedScreen } from "../../../recipe/session/prebuiltui";
import { SessionPreBuiltUI, AccessDeniedScreen } from "../../../recipe/session/prebuiltui";
import { LinkClicked as PasswordlessLinkClicked } from "../../../recipe/passwordless/prebuiltui";
import EmailVerification from "../../../recipe/emailverification";
import MultiFactorAuth from "../../../recipe/multifactorauth";
Expand Down Expand Up @@ -1105,7 +1105,7 @@ function testAuthPagePropTypes() {
// @ts-expect-error This has to be a valid first factor
<AuthPage preBuiltUIList={[ThirdPartyPreBuiltUI]} factors={["totp"]} />,
<AuthPage
preBuiltUIList={[ThirdPartyPreBuiltUI]}
preBuiltUIList={[ThirdPartyPreBuiltUI, SessionPreBuiltUI]}
factors={["thirdparty", "emailpassword", "link-email", "link-phone", "otp-email", "otp-phone"]}
/>,
];
Expand Down

0 comments on commit 26c16df

Please sign in to comment.