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

Adds handler for from=your-services param hint in /email/manage #1570

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

KludgeKML
Copy link
Contributor

@KludgeKML KludgeKML commented Jul 13, 2023

In order to improve the logged-in experience, in alphagov/frontend#3670 we are redirecting /account directly to home.account.gov.uk. This means that we are skipping session creation. It improves the general logged in behaviour, but means that if someone goes to /account and logs in, then follows the link to /email/manage, email-alert-frontend will not know that the user is logged in (because no session will exist), and they'll be prompted for their email address. To get around this, we add support for a hint parameter (from=your-services) which will be added to the link in the home.account.gov.uk/your-services page. When we go to /email/manage?from=your-services, the app knows that we came from One Login and are therefore probably logged in, so attempts a silent login.

https://trello.com/c/SiAQ3dZU/2086-redirect-govuk-account-to-homeaccountgovuk

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

@KludgeKML KludgeKML force-pushed the handle-one-login-hint branch 2 times, most recently from e388276 to a9ecbe0 Compare July 19, 2023 08:49
@KludgeKML KludgeKML requested a review from 1pretz1 July 19, 2023 08:49
Copy link
Contributor

@1pretz1 1pretz1 left a comment

Choose a reason for hiding this comment

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

Looks good! Just some small, non-blocking comments 🍏

app/controllers/subscriptions_management_controller.rb Outdated Show resolved Hide resolved
In order to improve the logged-in experience, in alphagov/frontend#3670 we are redirecting /account directly to home.account.gov.uk. This means that we are skipping session creation. It improves the general logged in behaviour, but means that if someone goes to /account and logs in, then follows the link to /email/manage, email-alert-frontend will not know that the user is logged in (because no session will exist), and they'll be prompted for their email address. To get around this, we add support for a hint parameter (from=your-services) which will be added to the link in the home.account.gov.uk/your-services page. When we go to /email/manage?from=your-services, the app knows that we came from One Login and are therefore probably logged in, so attempts a silent login.
@KludgeKML KludgeKML merged commit 9e32616 into main Jul 20, 2023
6 checks passed
@KludgeKML KludgeKML deleted the handle-one-login-hint branch July 20, 2023 10:15
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