Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
refactor: take uid_field from raw_attributes (jjbohn#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
bufferoverflow authored Apr 26, 2020
1 parent d76ba17 commit 1d90219
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/omniauth/strategies/openid_connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ class OpenIDConnect
option :uid_field, 'sub'

def uid
user_info.public_send(options.uid_field.to_s)
rescue NoMethodError
log :warn, "User sub:#{user_info.sub} missing info field: #{options.uid_field}"
user_info.sub
user_info.raw_attributes[options.uid_field.to_sym] || user_info.sub
end

info do
Expand Down

0 comments on commit 1d90219

Please sign in to comment.