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

Lg 15251 avoid linking email address #11717

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mdiarra3
Copy link
Member

@mdiarra3 mdiarra3 commented Jan 8, 2025

🎫 Ticket

Link to the relevant ticket:
LG-15251

🛠 Summary of changes

This allows Service providers with both 'all_emails' and 'email' attribute bundle to receive the last email sued for sign in instead of the email selected by the user.

📜 Testing Plan

Provide a checklist of steps to confirm the changes.

  • Step 1
  • Step 2
  • Step 3
    -->

@mdiarra3 mdiarra3 marked this pull request as ready for review January 8, 2025 18:17
Copy link
Contributor

@kevinsmaster5 kevinsmaster5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
Tried it out locally and behaved as described in AC

@@ -55,6 +55,16 @@ def last_email
end
end

def selected_email_id
if current_sp.present? &&
current_sp.attribute_bundle&.include?('all_email') &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no attribute all_email. This should be all_emails.

https://developers.login.gov/attributes/

@@ -57,6 +57,11 @@ def friendly_name
sp_metadata[:friendly_name]
end

def all_email_and_single_email_requested?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the behavior we're expecting. A partner would only request either email or all_emails in most cases. We only want to link the email if they requested a singular email, since this is when we show the option for the user to choose which email should be shared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants