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've been having an issue since I re-tried this gem. I'm noticing that current_user is always being returned as NIL when I try to inact the omniauth-steam function.
I've discussed with multiple other developers, and I can use the exact same function/call for Twitter as I can Steam but Steam will always return 'nil' (Thus not allowing me to properly authorize it against the account).
Has anyone else experienced this, or similar? I see a few mentions from 2015 but no resolutions.
def steam
omni = request.env["omniauth.auth"]
authentication = Authentication.find_by_provider_and_uid(omni['provider'], omni['uid'])
if authentication
flash[:notice] = "Logged in Successfully"
sign_in_and_redirect User.find(authentication.user_id)
elsif current_user # **This is where it should be hitting**
token = omni['extra']['raw_info'].steamid
# render :text => request.env["omniauth.auth"].info.to_hash.inspect
puts token
token_secret = ""
current_user.authentications.create!(:provider => omni['provider'],
:uid => omni['uid'],
:token => token,
:token_secret => token_secret)
flash[:notice] = "Authentication successful."
sign_in_and_redirect current_user
else
user = User.new
user.steam_omni(omni)
end
if user.save
flash[:notice] = "Logged in."
sign_in_and_redirect User.find(user.id)
else # **This is where it's actually hitting**
session[:omniauth] = omni.except('extra')
redirect_to new_user_registration_path
end
end
The text was updated successfully, but these errors were encountered:
I've been having an issue since I re-tried this gem. I'm noticing that
current_user
is always being returned as NIL when I try to inact the omniauth-steam function.I've discussed with multiple other developers, and I can use the exact same function/call for Twitter as I can Steam but Steam will always return 'nil' (Thus not allowing me to properly authorize it against the account).
Has anyone else experienced this, or similar? I see a few mentions from 2015 but no resolutions.
The text was updated successfully, but these errors were encountered: