We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abec8d1 commit cf374d7Copy full SHA for cf374d7
app.rb
@@ -44,10 +44,10 @@ def current_user
44
45
get '/auth/:name/callback' do
46
auth = request.env["omniauth.auth"]
47
- user = User.first_or_create({ :uid => auth["uid"]}, {
48
- :uid => auth["uid"],
49
- :nickname => auth["user_info"]["nickname"],
50
- :name => auth["user_info"]["name"],
+ user = User.first_or_create({ :uid => auth["uid"]}, {
+ :uid => auth["uid"],
+ :nickname => auth["info"]["nickname"],
+ :name => auth["info"]["name"],
51
:created_at => Time.now })
52
session[:user_id] = user.id
53
redirect '/'
0 commit comments