n1ru4l
11/07/2022, 10:07 AMrp_st
11/07/2022, 10:08 AMn1ru4l
11/07/2022, 10:15 AMn1ru4l
11/07/2022, 10:17 AMSession.revokeAllSessionsForUser
, I still have to blacklist the existing tokens?rp_st
11/07/2022, 10:18 AMn1ru4l
11/07/2022, 10:18 AMrp_st
11/07/2022, 10:18 AMrp_st
11/07/2022, 10:19 AMrp_st
11/07/2022, 10:19 AMrp_st
11/07/2022, 10:19 AMn1ru4l
11/07/2022, 10:22 AMn1ru4l
11/08/2022, 2:28 PMError: Either the session has ended or has been blacklisted
Is there a simple way to gracefully handle this? Is this even considered a bug?n1ru4l
11/08/2022, 2:33 PMn1ru4l
11/08/2022, 2:33 PMerr: SessionError: Either the session has ended or has been blacklisted
at Object.<anonymous> (/Users/laurinquast/Projects/graphql-hive-2/node_modules/.pnpm/supertokens-node@12.0.5/node_modules/supertokens-node/lib/build/recipe/session/sessionFunctions.js:245:19)
at Generator.next (<anonymous>)
at fulfilled (/Users/laurinquast/Projects/graphql-hive-2/node_modules/.pnpm/supertokens-node@12.0.5/node_modules/supertokens-node/lib/build/recipe/session/sessionFunctions.js:15:36)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
type: 'UNAUTHORISED',
payload: { clearCookies: true },
errMagic: 'ndskajfasndlfkj435234krjdsa',
fromRecipe: 'session',
page: '/[orgId]'
},
yesrp_st
11/08/2022, 2:33 PMn1ru4l
11/08/2022, 2:33 PMrp_st
11/08/2022, 2:34 PMrp_st
11/08/2022, 2:34 PMn1ru4l
11/08/2022, 2:35 PMn1ru4l
11/08/2022, 2:35 PMSession.getSession
rp_st
11/08/2022, 2:35 PMrp_st
11/08/2022, 2:35 PMrp_st
11/08/2022, 2:36 PMn1ru4l
11/08/2022, 2:36 PMn1ru4l
11/08/2022, 2:37 PMrp_st
11/08/2022, 2:39 PMn1ru4l
11/08/2022, 2:39 PMrp_st
11/08/2022, 2:40 PMn1ru4l
11/08/2022, 2:43 PMrp_st
11/08/2022, 2:43 PMrp_st
11/08/2022, 2:43 PMn1ru4l
11/08/2022, 2:45 PMrp_st
11/08/2022, 2:46 PMmaheshmogal
11/24/2022, 12:45 PMmaheshmogal
11/24/2022, 12:46 PMrp_st
11/24/2022, 12:47 PMmaheshmogal
11/24/2022, 12:48 PMmaheshmogal
11/24/2022, 12:48 PMmaheshmogal
11/24/2022, 12:49 PMmaheshmogal
11/24/2022, 12:50 PMrp_st
11/24/2022, 12:53 PMmaheshmogal
11/24/2022, 12:54 PMrp_st
11/24/2022, 12:55 PMrp_st
11/24/2022, 12:55 PMmaheshmogal
11/24/2022, 12:56 PMrp_st
11/24/2022, 12:57 PM/auth
page? are you doing any SSR on the the /auth
page?maheshmogal
11/24/2022, 12:57 PMrp_st
11/24/2022, 12:58 PMmaheshmogal
11/24/2022, 12:58 PMimport React, { useEffect } from 'react'
import dynamic from 'next/dynamic'
import SuperTokens from 'supertokens-auth-react'
import { redirectToAuth } from 'supertokens-auth-react'
const SuperTokensComponentNoSSR = dynamic(
new Promise((res) => res(SuperTokens.getRoutingComponent)) as any,
{ ssr: false },
)
export default function Auth() {
// if the user visits a page that is not handled by us (like /auth/random), then we redirect them back to the auth page.
useEffect(() => {
if (!SuperTokens.canHandleRoute()) {
redirectToAuth()
}
}, [])
return <SuperTokensComponentNoSSR />
}
rp_st
11/24/2022, 12:59 PMif (!SuperTokens.canHandleRoute()) {
if statement?maheshmogal
11/24/2022, 12:59 PMmaheshmogal
11/24/2022, 1:00 PMrp_st
11/24/2022, 1:00 PM404
when navigating to /auth
rp_st
11/24/2022, 1:00 PMmaheshmogal
11/24/2022, 1:03 PMrp_st
11/24/2022, 1:03 PMrp_st
11/24/2022, 1:03 PMrp_st
11/24/2022, 1:04 PMrp_st
11/24/2022, 1:04 PM/
pathsmaheshmogal
11/24/2022, 1:09 PMrp_st
11/24/2022, 1:12 PM