I try revoking by creating my own API followed in the ThirdPartyEmailPass for Next JS
js
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 state