Skip to content

Commit

Permalink
fix wrong token given after successfull authentication on ruby example
Browse files Browse the repository at this point in the history
  • Loading branch information
Fs02 committed Feb 24, 2016
1 parent eaedd87 commit 6badac5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/server/ruby/app/controllers/auth_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def authenticate
if @oauth.authorized?
@user = User.from_auth(@oauth.formatted_user_data, current_user)
if @user
render_success(token: @oauth.access_token, authentication_token: @user.authentication_token, id: @user.id)
render_success(token: Token.encode(@user.id), id: @user.id)
else
render_error "This #{params[:provider]} account is used already"
end
Expand Down Expand Up @@ -76,4 +76,4 @@ def auth_params
params.require(:auth).permit(:email, :password, :displayName)
end

end
end

0 comments on commit 6badac5

Please sign in to comment.