-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: provide a custom error message or redirect #1
Comments
I also like the API of having first param for provider: From: createAuthMiddleware({
provider: 'basic',
providerOptions: { username: 'test', password: 'test' }
}) To: createAuthMiddleware('basic', {
username: 'test',
password: 'test'
}) |
Dealing with redirects might start to make usage tricky since goal of this package is to secure pages in simplest possible way not a full featured authentication system that passport provides. (there is no login page. Every route matching middleware needs auth) |
Yes I fully agree on the simplicity of it. Could we at least give a way to the user a way to render a specific response (ex: rendering a HTML document to explain why he does not have access) createAuthMiddleware({
enabled: process.env.NODE_ENV === 'production',
provider: 'github',
providerOptions: {
clientId: 'id',
clientSecret: 'secret'
},
sessionSecret: 'secret',
message: fs.readFileSync('error.html')
}) |
|
I like the simple redirect of passport.js.
The text was updated successfully, but these errors were encountered: