-
Notifications
You must be signed in to change notification settings - Fork 380
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
Unable to get value from conn.assigns using Guardian.Plug.claims #55
Comments
@Lbatson I'm using Plug 1.0.2 and Guardian 0.6.2 together without issue. As for the tuple, I'm pretty sure Guardian assigns that value. See plug.ex#L139 & plug_test.exs#L13 |
@doomspork it still fails for me. are you using Also, not sure if it's relevant or not but i'm using Erlang 18 and Elixir 1.1.1 |
Ok, think i've found the issue. The way |
Hey @Lbatson I'm also on Erlang 18 and Elixir 1.1.1. Unless I'm reading the
I suspect there might be some other configuration you're missing. Is your project on GitHub? I recently updated the Guardian sample project to the latest dependencies, have you looked at that? My changes are in a PR here: phoenix_guardian/pull/5 |
The |
@Lbatson looks like you're right. I've been using |
I don't think checking the value in conn.assigns dict returns a tuple. all the documentation i can find points now to returning just the value or nil. Since
Guardian.Plug.claims
is checking for this tuple, https://github.com/hassox/guardian/blob/master/lib/guardian/plug.ex#L161, it's always failing for me with the:no_session
error case. This breaks me checking claims and the various plugs likeEnsureAuthenticated
that use it. I'm using Plug v1.0.2 and I noticed the test suite is set up for v1.0.0 but i can't see the difference in return values for it between the versions. Is there something I'm missing?The text was updated successfully, but these errors were encountered: