I am using my own Omniauth by using doorkeeper.I also use devise. The issue is that in the callback I sign_in the user but as soon as I redirect him to the dashboard I get the current_user as nil. Dont know why the cookies/ sessions is getting wiped.
In the callback method after the sign_in method the current_user is not nil but in the dashboard show method the current_user comes as nil.
Doorkeeper.configure do
orm :active_record
# This block will be called to check whether the resource owner is authenticated or not.
resource_owner_authenticator do
current_user || warden.authenticate!(:scope => :user)
end
end
Ah, you’re right. Have you checked out the example apps for clients? There is an example for devise that might come in handy. Other than that, I don’t think I can help much more.
I fixed the issue. I was also actually trying to so single sign on because of which I was doing something to the sessions variable and hence the current_user was disappearing.
Another issue. How do I redirect the user back to the client app after he logs in with the provider app? Currently after he logs in he is taken to the provider app dashboard.