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

Single redirect /account to home.account.gov.uk rather than session start if no redirect param passed #3670

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

KludgeKML
Copy link
Contributor

@KludgeKML KludgeKML commented Jun 27, 2023

⚠️ NOTE: To preserve user journey on /email/manage, this requires DI Home to support the login hints parameter in email-alert-frontend. Do not merge until that is confirmed! (Now confirmed live)

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

What

Redirect requests to /account directly to home.account.gov.uk if there is no redirect param supplied.

Why

Request from the OneLogin team - redirecting here prevents a problem where rather than being asked to sign in with 2FA to begin with, an uplift scenario starts (where the user logs in without 2FA, then the 2FA is requested later). This is leading to confusing differences in 2FA prompts, and a situation where people resetting their password are asked for their 2FA twice consecutively.

Trello card

@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-3670 June 27, 2023 13:38 Inactive
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-3670 June 28, 2023 15:19 Inactive
@KludgeKML KludgeKML changed the title TEST: Single redirect to home.account.gov.uk rather than session start. Single redirect /account to home.account.gov.uk rather than session start if no redirect param passed Jun 28, 2023
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-3670 June 29, 2023 08:43 Inactive
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-3670 June 29, 2023 11:08 Inactive
…tart.

- Currently /account/home redirects to home.account.gov.uk, but /account
  is the session creation start, which bounces to the acount api signin
  URL (on oidc.account.gov.uk)
- This is causing odd behaviour when people log in to check emails
  (accounts with 2FA are logged in then sent for an uplift to 2FA
  to get to their account homepage - especially awkward when they
  reset their password, at which point they end up putting in 3
  2FA codes -  one to change the password, then twice to log in
  to their account).
- DI have asked that we redirect /account directly to home.account.gov.uk
  to avoid this problem. This should be okay, although this endpoint
  also takes redirects. To keep current behaviour, we bounce to
  home.account.gov.uk only if no valid redirect params are passed.
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-3670 July 11, 2023 09:37 Inactive
KludgeKML added a commit to alphagov/email-alert-frontend that referenced this pull request 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.
KludgeKML added a commit to alphagov/email-alert-frontend that referenced this pull request 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.
KludgeKML added a commit to alphagov/email-alert-frontend that referenced this pull request Jul 19, 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.
KludgeKML added a commit to alphagov/email-alert-frontend that referenced this pull request Jul 19, 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.
KludgeKML added a commit to alphagov/email-alert-frontend that referenced this pull request Jul 20, 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.
@KludgeKML KludgeKML requested a review from 1pretz1 July 20, 2023 11:10
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!

@KludgeKML KludgeKML marked this pull request as ready for review August 8, 2023 10:24
@KludgeKML KludgeKML merged commit 8d62400 into main Aug 8, 2023
7 checks passed
@KludgeKML KludgeKML deleted the account-redirect branch August 8, 2023 10:25
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