File tree 1 file changed +5
-3
lines changed
examples/with-supertokens/pages/auth
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -3,17 +3,19 @@ import React, { useEffect } from 'react'
3
3
import styles from '../../styles/Home.module.css'
4
4
import dynamic from 'next/dynamic'
5
5
import SuperTokens from 'supertokens-auth-react'
6
- import { redirectToAuth } from 'supertokens-auth-react/recipe/thirdpartyemailpassword '
6
+ import { redirectToAuth } from 'supertokens-auth-react'
7
7
8
8
const SuperTokensComponentNoSSR = dynamic (
9
- new Promise ( ( res ) => res ( SuperTokens . getRoutingComponent ) ) ,
9
+ new Promise ( ( res ) => res ( SuperTokens . getRoutingComponent ) ) as any ,
10
10
{ ssr : false }
11
11
)
12
12
13
13
export default function Auth ( ) : JSX . Element {
14
14
useEffect ( ( ) => {
15
15
if ( SuperTokens . canHandleRoute ( ) === false ) {
16
- redirectToAuth ( )
16
+ redirectToAuth ( {
17
+ redirectBack : false ,
18
+ } )
17
19
}
18
20
} , [ ] )
19
21
You can’t perform that action at this time.
0 commit comments