Skip to content

Fix SSR guide to accomodate for expired access tokens (where even the key expired) #876

Description

@porcellus

The issue is present here: https://supertokens.com/docs/thirdparty/nextjs/app-directory/protecting-route

The solution I recommended (although this should be re-validated):

I think you can resolve this by updating verifyToken to resolve with undefined instead of rejecting with an error in this case. The user is not expected to be logged out btw, they should be able to refresh in this case. (So you should end up in the branch rendering TryRefreshComponent)

For more details see this thread

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions