Me/dpc 5484 flag primary csp email#3017
Conversation
| def post_signin_actions(user, csp_user, auth) | ||
| ial_2_actions(user, auth) | ||
| update_email(csp_user, auth.extra.raw_info.all_emails) | ||
| update_email(csp_user, auth.extra.raw_info.all_emails, auth.info.email) |
There was a problem hiding this comment.
This will probably have to be different for each CSP. Login.gov just happens to send the primary email in auth.info.email.
There was a problem hiding this comment.
could you make this a method so it can be easily changed by controller? like
def user_email(auth)
auth.info.email
end
There was a problem hiding this comment.
No problem! This is probably the more "Railsy" way of doing it.
| @@ -0,0 +1,11 @@ | |||
| class AddPrimaryToUserEmails < ActiveRecord::Migration[8.0] | |||
There was a problem hiding this comment.
nitpicky, but do you want to change this column to 'verified' too?
There was a problem hiding this comment.
Maybe nitpicky, but still a good idea.
|
I see some confusion around the usage of primary vs verified terms for an email. Here is a quick summary of the differences: For all purposes, DPC will borrow the primary flag and utilize it to provide it a hint to the user to use the right CSP and email. |
Ok 👍 , renaming verified back to primary. |
This reverts commit 67978a7.
…om/CMSgov/dpc-app into me/dpc-5484-flag-primary-csp-email
🎫 Ticket
https://jira.cms.gov/browse/DPC-5484
🛠 Changes
user_emailstable.ℹ️ Context
Eventually, if a user logs in with a new CSP we want to be able to tell them that they previously signed up under a previous CSP along with the email attached to it. To do this, we need to know what their primary, verified email is with each CSP.
🧪 Validation