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

Current logged in user #46

Closed
micahlmartin opened this issue Dec 12, 2014 · 4 comments
Closed

Current logged in user #46

micahlmartin opened this issue Dec 12, 2014 · 4 comments
Assignees
Labels
support Questions, discussions, and general support

Comments

@micahlmartin
Copy link

I'm wondering how to use this so that on every request it will set my current authenticated user. Currently it seems that the only time request.auth.isAuthenticated is set is when I specifically set the route to require authentication. I'm trying to figure out how to get functionality like in rails or other frameworks where you always have access to the request.auth record without having to force them to be authenticated on each route. That way I can set a navbar header with the current logged in user on all pages. Does this make sense? Is there some other plugin I should be using for this?

@jaw187
Copy link
Contributor

jaw187 commented Dec 12, 2014

You will want to configure mode: 'try'

@jaw187 jaw187 closed this as completed Dec 12, 2014
@micahlmartin
Copy link
Author

Oh dear god. Thank you!

@hueniverse
Copy link
Contributor

Keep in mind that optional mode means either no auth or valid auth. try will also allow requests with bad auth.

@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

4 participants