File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
examples/with-supertokens/pages Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -16,19 +16,20 @@ export async function getServerSideProps(context) {
1616 supertokensNode . init ( backendConfig ( ) )
1717 let session
1818 try {
19- session = await Session . getSession ( context . req , context . res )
19+ session = await Session . getSession ( context . req , context . res , {
20+ overrideGlobalClaimValidators : async function ( ) {
21+ return [ ]
22+ } ,
23+ } )
2024 } catch ( err ) {
2125 if ( err . type === Session . Error . TRY_REFRESH_TOKEN ) {
2226 return { props : { fromSupertokens : 'needs-refresh' } }
2327 } else if ( err . type === Session . Error . UNAUTHORISED ) {
2428 // this will force the frontend to try and refresh which will fail
2529 // clearing all cookies and redirecting the user to the login screen.
2630 return { props : { fromSupertokens : 'needs-refresh' } }
27- } else if ( err . type === Session . Error . INVALID_CLAIMS ) {
28- return { props : { } }
29- } else {
30- throw err
3131 }
32+ throw err
3233 }
3334
3435 return {
You can’t perform that action at this time.
0 commit comments