Skip to content

Commit

Permalink
Merge pull request #663 from KendallPark/bypass-sign-in
Browse files Browse the repository at this point in the history
added bypass_sign_in for next version of Devise
  • Loading branch information
booleanbetrayal authored Jun 17, 2016
2 parents bc04747 + a9294f8 commit 8df9f88
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ def set_user_by_token(mapping=nil)
user = uid && rc.find_by_uid(uid)

if user && user.valid_token?(@token, @client_id)
sign_in(:user, user, store: false, bypass: true)
# sign_in with bypass: true will be deprecated in the next version of Devise
if self.respond_to? :bypass_sign_in
bypass_sign_in(user, scope: :user)
else
sign_in(:user, user, store: false, bypass: true)
end
return @resource = user
else
# zero all values previously set values
Expand Down

0 comments on commit 8df9f88

Please sign in to comment.