Skip to content

v4 migration and Allowed Callback URLs #2182

Closed Answered by frederikprijck
nnnnat asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,

yes you should be able to use what is defined here: https://github.com/auth0/nextjs-auth0/blob/main/EXAMPLES.md#custom-routes

export const auth0 = new Auth0Client({
  routes: {
    login: "/api/auth/login",
    logout: "/api/auth/logout",
    callback: "/api/auth/callback",
    backChannelLogout: "/api/auth/backchannel-logout",
  },
})

Then for the two other endpoints: /auth/profile and /auth/access-token, you can define the following two environment variables:

NEXT_PUBLIC_PROFILE_ROUTE=/api/auth/profile
NEXT_PUBLIC_ACCESS_TOKEN_ROUTE=/api/auth/access-token

Let me know if that doesnt work.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nnnnat
Comment options

Answer selected by nnnnat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants