ashlite
06/19/2022, 12:41 PMjs
export default async function logout(req: SessionRequest, res: any) {
await superTokensNextWrapper(
async (next) => {
await verifySession()(req, res, next);
},
req,
res
)
// This will delete the session from the db and from the frontend (cookies)
await req.session!.revokeSession();
But the button that got wrapped in
js
const SessionAuthNoSSR = dynamic(
new Promise((res) => {
res(SessionAuth)
}),
{ssr: false}
)
Is not updating to no session state.
Refreshing the page still have the same output.
The only work around for now is to access the page wrapped in ThirdPartyEmailPasswordAuth
That will kick user to auth page and then the button above will updated to the right state.
The Button check useSessionContext() for updating the correct staterp
06/19/2022, 12:44 PMashlite
06/19/2022, 12:48 PMrp
06/19/2022, 12:52 PMashlite
06/19/2022, 12:55 PMrp
06/19/2022, 12:58 PMashlite
06/19/2022, 1:02 PMrp
06/19/2022, 1:02 PM