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

Should reply include unauthenticated error if redirectOnTry = false and mode is try? #18

Closed
HenrikJoreteg opened this issue Jul 30, 2014 · 3 comments
Labels
support Questions, discussions, and general support

Comments

@HenrikJoreteg
Copy link

I want auth to be optional, and simply return a slightly different page whether you have a session or not.

It seems like i should be able to set auth.mode to try and redirectOnTry = false and reply without passing the error through.

The unauthenticated error gets created here: https://github.com/spumko/hapi-auth-cookie/blob/master/lib/index.js#L81

Then included here: https://github.com/spumko/hapi-auth-cookie/blob/master/lib/index.js#L109

It replies properly but that exception shows up in logs even though it's not an exception .

Seems like maybe it shouldn't? Or am I doing it wrong.

I basically want optional auth without errors in either case.

@HenrikJoreteg
Copy link
Author

So, it was only doing this on my static routes served, so... meh. :) Closing.

@hueniverse
Copy link
Contributor

Was the issue just how to mute these kinds of errors?

@Marsup Marsup added support Questions, discussions, and general support and removed question labels Sep 21, 2019
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

3 participants