Closed flomaster9 closed 6 years ago
Maybe I can help you out (I'm not sure if this is 100% correct). You don't have to put use Guardian.Plug
on top if the file. Replace that line with alias Rumble.Auth.Guardian
and call sign_in
with Guardian.Plug.sign_in(user)
.
That worked in my case: https://github.com/hlhr/phoenix_authentication/blob/master/lib/phoenix_authentication_web/controllers/auth_controller.ex .
This work !! thanks ) I will close issue
When i try to use Guardian.Plug.sign_in while testing, terminal tell me this
but when i write before, in the top of file
The sign_in/2 is available, and i see this
Here is my Api.Auth.login
Here is config
config :api, Api.Auth.Guardian, issuer: "api", secret_key: "HNinpKh9Ne3tr8BpjCpAEh0xzCqTIG3PWsfkR2AtzvUaRIpbs6oIQ9RcmjmGPekJ"
And guardian callbacks is:
I read guide step by step, but something went wrong...