Skip to content

Commit

Permalink
Return id and email in openid connect subject
Browse files Browse the repository at this point in the history
  • Loading branch information
Redande committed Nov 30, 2023
1 parent b77ba5e commit 026b404
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/initializers/doorkeeper_openid_connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@

user = JSON.parse(user_response)

user['id']
user_id = user['id']
user_email = User.find(resource_owner.id).email

return { id: user_id, email: user_email }

# or if you need pairwise subject identifier, implement like below:
# Digest::SHA256.hexdigest("#{resource_owner.id}#{URI.parse(application.redirect_uri).host}#{'your_secret_salt'}")
Expand Down

0 comments on commit 026b404

Please sign in to comment.