You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am expecting the user to be created using the developer strategy on my local env. According to the docs auth['info']['name'] and auth['uid'] are the correct way to retreive this hash, no?
Actual Behavior
undefined local variable or method auth' for #SessionsController:0x000055a2ebdbce80`
Steps to Reproduce
Here is how my controller is currently configured.
def omni
@user = User.find_or_create_by(uid: auth['uid']) do |u|
u.name = auth['info']['name']
u.uid = auth['uid']
end
pp request.env['omniauth.auth']
session[:user_id] = @user.id
redirect_to root_path
end
The text was updated successfully, but these errors were encountered:
I experienced something like this;
Have you included :omniauthable, omniauth_providers: %i[github facebook](change accordingly with your provider name) in your model?
in any case i suggest to follow the wiki about omniauth on devise https://github.com/heartcombo/devise/wiki/OmniAuth:-Overview
Configuration
omniauth
2.7.1
Rails 6
Ubuntu 20.04
Expected Behavior
I am expecting the user to be created using the developer strategy on my local env. According to the docs auth['info']['name'] and auth['uid'] are the correct way to retreive this hash, no?
Actual Behavior
undefined local variable or method
auth' for #SessionsController:0x000055a2ebdbce80`Steps to Reproduce
Here is how my controller is currently configured.
The text was updated successfully, but these errors were encountered: