Skip to content

Commit 6385be8

Browse files
committed
fix(auth-ui): add missing Supertokens ui router
1 parent b7aaf0f commit 6385be8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

services/auth-ui/src/Router.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
import { ReactElement } from "react";
22

3+
import { EmailVerificationPreBuiltUI } from "supertokens-auth-react/lib/build/recipe/emailverification/prebuiltui";
34
import { EmailPasswordPreBuiltUI } from "supertokens-auth-react/recipe/emailpassword/prebuiltui";
45
import { canHandleRoute, getRoutingComponent } from "supertokens-auth-react/ui";
56

67
import { ErrorView } from "src/views/ErrorView";
78

9+
const SUPERTOKEN_ROUTERS = [
10+
EmailPasswordPreBuiltUI,
11+
EmailVerificationPreBuiltUI,
12+
];
13+
814
export function Router(): ReactElement {
9-
if (!canHandleRoute([EmailPasswordPreBuiltUI])) {
15+
if (!canHandleRoute(SUPERTOKEN_ROUTERS)) {
1016
return (
1117
<ErrorView message="An unexpected error has occurred: Unable to handle route. Please contact support." />
1218
);
1319
}
1420

15-
const component = getRoutingComponent([EmailPasswordPreBuiltUI]);
21+
const component = getRoutingComponent(SUPERTOKEN_ROUTERS);
1622

1723
if (!component) {
1824
return (

0 commit comments

Comments
 (0)