Skip to content
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

Add option to gracefully handle authentication failures #11

Open
bf opened this issue Sep 18, 2015 · 3 comments
Open

Add option to gracefully handle authentication failures #11

bf opened this issue Sep 18, 2015 · 3 comments

Comments

@bf
Copy link

bf commented Sep 18, 2015

Hello, I am using hapi-io in an auth: { mode: 'try' } environment. This means I have many routes that need authentication, but also some that don't need any.

I've added a new option to hapi-io called authModeTry (default false) which - when user authentication fails - feeds back false to hapi instead the error message authentication failed.

I will now try to add the pull request (first time, so I hope I get everything right).

@sibartlett
Copy link
Owner

Hi, thanks for the pull request.

You can simply omit the auth option when registering the hapi-io plugin. No authentication will be required to establish a socket.io connection, and authentication will still run on a per route basis.

I'll update the README to indicate that the auth option is optional.

@sibartlett
Copy link
Owner

Hi @bf, was my last reply useful? If so, can I close this issue?

@bf
Copy link
Author

bf commented Mar 8, 2017

No it didn't help. If I omit "auth" option, I'd need to add auth strategy to dozens of routes, which is very cumbersome. Even more when I have set up the normal react app to just use auth: { mode:"try" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants