david_sun
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_st
06/19/2022, 12:44 PMrp_st
06/19/2022, 12:45 PMdavid_sun
06/19/2022, 12:48 PMdavid_sun
06/19/2022, 12:48 PMrp_st
06/19/2022, 12:52 PMrp_st
06/19/2022, 12:52 PMdavid_sun
06/19/2022, 12:55 PMrp_st
06/19/2022, 12:58 PMdavid_sun
06/19/2022, 1:02 PMrp_st
06/19/2022, 1:02 PM