Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add email_verified claim in user info #131

Merged
merged 1 commit into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/omniauth/strategies/openid_connect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def uid
{
name: user_info.name,
email: user_info.email,
email_verified: user_info.email_verified,
nickname: user_info.preferred_username,
first_name: user_info.given_name,
last_name: user_info.family_name,
Expand Down
1 change: 1 addition & 0 deletions test/lib/omniauth/strategies/openid_connect_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ def test_info
info = strategy.info
assert_equal user_info.name, info[:name]
assert_equal user_info.email, info[:email]
assert_equal user_info.email_verified, info[:email_verified]
assert_equal user_info.preferred_username, info[:nickname]
assert_equal user_info.given_name, info[:first_name]
assert_equal user_info.family_name, info[:last_name]
Expand Down
1 change: 1 addition & 0 deletions test/strategy_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def user_info
sub: SecureRandom.hex(16),
name: Faker::Name.name,
email: Faker::Internet.email,
email_verified: Faker::Boolean.boolean,
nickname: Faker::Name.first_name,
preferred_username: Faker::Internet.user_name,
given_name: Faker::Name.first_name,
Expand Down