Skip to content

Reset selected email session value on email deletion#11492

Merged
aduth merged 1 commit intomainfrom
aduth-reset-selected-email-session-delete
Nov 12, 2024
Merged

Reset selected email session value on email deletion#11492
aduth merged 1 commit intomainfrom
aduth-reset-selected-email-session-delete

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Nov 12, 2024

🛠 Summary of changes

Updates email deletion behavior to reset user session value for selected email preference.

This fixes an unlikely user path which could result in an unhandled 500 error.

📜 Testing Plan

  1. Prerequisite: Have an account with multiple email addresses
  2. Prerequisite: Disconnect from sample application if already consented, from "Connected Accounts" account page
  3. Run sample application in separate process from IdP
  4. Go to http://localhost:9292
  5. Click "Sign in"
  6. Complete sign-in up to consent screen
  7. Click "Change" next to email address
  8. Select an email address. Remember which email you selected.
  9. Click "Change"
  10. In a separate tab, go to http://localhost:3000
  11. From account dashboard, delete (and confirm deletion of) the email you selected on Step 8
  12. Return to the original tab for the partner attributes consent screen
  13. Refresh the page

Before: You'd encounter a ActiveRecord::RecordNotFound 500 error
After: The consent screen loads, and the email address is reset to the default value (what you'd seen at Step 6)

changelog: Upcoming Features, Partner Email Selection, Reset selected email session value on email deletion
@aduth aduth requested a review from a team November 12, 2024 13:21
@aduth aduth merged commit 3ce211e into main Nov 12, 2024
@aduth aduth deleted the aduth-reset-selected-email-session-delete branch November 12, 2024 14:28
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.

2 participants