-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split configuration into Next and Base config #263
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/auth0/nextjs-auth0/ddpz5pzsw [Deployment for a52b686 canceled] |
* See {@link Config} | ||
* @ignore | ||
*/ | ||
export type NextConfig = Pick<BaseConfig, 'routes' | 'identityClaimFilter'>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To add custom routes
export interface NextConfig extends Pick<BaseConfig, 'identityClaimFilter'> {
routes: {
postLogoutRedirect: string;
callback: string;
login: string;
logout: string;
};
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just have a question.
login: Joi.alternatives([Joi.string().uri({ relativeOnly: true }), Joi.boolean().valid(false)]).default('/login'), | ||
logout: Joi.alternatives([Joi.string().uri({ relativeOnly: true }), Joi.boolean().valid(false)]).default('/logout'), | ||
callback: Joi.string().uri({ relativeOnly: true }).default('/callback'), | ||
callback: Joi.string().uri({ relativeOnly: true }).required(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The login and logout URLs don't need to be required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the login and logout URLs from the config as they are not used by auth0-session
Description
auth0-session
) to make it easier to supply configuration that applies to the Next layer only (eg custom routes)auth0-session
Testing
Checklist
master