Skip to content

Commit 26c16df

Browse files
authored
fix: add SessionPreBuiltUI into PreBuiltRecipes (#853)
1 parent c2190da commit 26c16df

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- `redirectToFactorChooser` now accepts a `stepUp` option to set the `stepUp` query param.
1919
- `redirectToFactor` now accepts a `stepUp` option to set the `stepUp` query param.
2020

21+
### Fixes
22+
23+
- 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)
24+
2125
## [0.45.1] - 2024-08-09
2226

2327
### Changes

lib/build/ui/types.d.ts

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

lib/ts/ui/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { EmailPasswordPreBuiltUI } from "../recipe/emailpassword/prebuiltui
22
import type { EmailVerificationPreBuiltUI } from "../recipe/emailverification/prebuiltui";
33
import type { MultiFactorAuthPreBuiltUI } from "../recipe/multifactorauth/prebuiltui";
44
import type { PasswordlessPreBuiltUI } from "../recipe/passwordless/prebuiltui";
5+
import type { SessionPreBuiltUI } from "../recipe/session/prebuiltui";
56
import type { ThirdPartyPreBuiltUI } from "../recipe/thirdparty/prebuiltui";
67
import type { TOTPPreBuiltUI } from "../recipe/totp/prebuiltui";
78

@@ -18,4 +19,5 @@ export type PreBuiltRecipes = (
1819
| typeof EmailVerificationPreBuiltUI
1920
| typeof MultiFactorAuthPreBuiltUI
2021
| typeof TOTPPreBuiltUI
22+
| typeof SessionPreBuiltUI
2123
)[];

test/with-typescript/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
EmailPasswordPreBuiltUI,
3434
ResetPasswordUsingToken as EmailPasswordResetPasswordUsingToken,
3535
} from "../../../recipe/emailpassword/prebuiltui";
36-
import { AccessDeniedScreen } from "../../../recipe/session/prebuiltui";
36+
import { SessionPreBuiltUI, AccessDeniedScreen } from "../../../recipe/session/prebuiltui";
3737
import { LinkClicked as PasswordlessLinkClicked } from "../../../recipe/passwordless/prebuiltui";
3838
import EmailVerification from "../../../recipe/emailverification";
3939
import MultiFactorAuth from "../../../recipe/multifactorauth";
@@ -1105,7 +1105,7 @@ function testAuthPagePropTypes() {
11051105
// @ts-expect-error This has to be a valid first factor
11061106
<AuthPage preBuiltUIList={[ThirdPartyPreBuiltUI]} factors={["totp"]} />,
11071107
<AuthPage
1108-
preBuiltUIList={[ThirdPartyPreBuiltUI]}
1108+
preBuiltUIList={[ThirdPartyPreBuiltUI, SessionPreBuiltUI]}
11091109
factors={["thirdparty", "emailpassword", "link-email", "link-phone", "otp-email", "otp-phone"]}
11101110
/>,
11111111
];

0 commit comments

Comments
 (0)