danschultzer / phoenix_oauth2_provider

Get an OAuth 2 provider running in your phoenix with controllers, views and models in just two minutes
MIT License
84 stars 41 forks source link

Resource owner was not found with :user assigns #18

Closed chasers closed 5 years ago

chasers commented 5 years ago

Almost there!

I'm getting this when I try to oauth in and I'm not logged in. Everything works logged in.

I'm assuming because I don't have a :user in my assigns, like it says, but I'm a bit stuck on how to get one there or how to redirect to a login. Branch I'm working on is here: https://github.com/Logflare/logflare/tree/oauth2-prov

Thanks again!

chasers commented 5 years ago

Okay I kind of have it ... now I need to redirect to a login form and then redirect to the original url.

chasers commented 5 years ago

Okay ... put that data in the session which now I can pick out when my user comes back from logging in.

danschultzer commented 5 years ago

Great! Yeah, it was because the user hasn't been assigned in the conn.