Log the user out of auth0 session after getting 401 response in nextjs sdk

My colleague found another community forum post about this same issue and the solution was to add this authorizationParams: { prompt: 'login' }, to the handleLogin function.

It should look something like this:

    handleLogin(req, res, {
        authorizationParams: { prompt: 'login' },
        returnTo: '/',
    })
2 Likes