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

Allow users to authenticate with Azure in order to capture their Justice email address #1280

Merged
merged 11 commits into from
Apr 3, 2024

Conversation

michaeljcollinsuk
Copy link
Contributor

@michaeljcollinsuk michaeljcollinsuk commented Mar 28, 2024

📝 Summary

This PR contributes to ministryofjustice/analytical-platform#3605

This PR implements a new page that allows a user to authenticate with Azure/EntraID using their @justice.gov.uk email address. This is intended as a one time process, in order to capture their justice email address.

After login, users are redirected to the page where it explains the purpose of authenticating. There is a button to skip the process, which allows users to continue as normal. The next time they log in they will be redirected to the new page again. I have set an arbritary deadline of 30th April, but this is a WIP and has no real effect.

image

image

The changes in this PR are needed as part of our wider work around offering Quicksight to AP users via the new AP UI.

🔍 What should the reviewer concentrate on?

  • The text displayed to the user - this is a WIP/first draft so any suggestions about the messaging here are welcome
  • Authentication process

🧑‍💻 How should the reviewer test these changes?

NOTE: Ideally you should log out of your Justice identity (e.g. outlook) first. By doing this you will see the full flow. If you complete the following steps while already logged in, it will still work and you will capture your @justice.gov.uk email but you wont go through the full steps of logging in with your Justice email.

  • You will need to add some additional env vars (ask me)
  • Run the project locally
  • Log in as usual
  • You should be redirected to the new page
  • Click the "Skip for now" button. This should allow you to look at tools, datasources etc
  • Log out and back in
  • You should be redirected to the new page - click "Authenticate" button.
  • You will be redirected to log in with your justice email, as you would for logging in to any MS service (such as Outlook).
  • After completing the process, you are redirected and a success message is displayed showing your @justice.gov.uk email
  • Log out and back in again - you should NOT be redirected to the new page this time, as your details are already stored.

📚 Documentation status

  • No changes to the documentation are required
  • This PR includes all relevant documentation
  • Documentation will be added in the future because ... (see issue #...)

@michaeljcollinsuk michaeljcollinsuk marked this pull request as ready for review April 3, 2024 15:40
Copy link
Contributor

@jamesstottmoj jamesstottmoj left a comment

Choose a reason for hiding this comment

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

Tested manually and ran unit tests. Code looks good. Approved

@michaeljcollinsuk michaeljcollinsuk merged commit 8292e21 into main Apr 3, 2024
5 checks passed
@michaeljcollinsuk michaeljcollinsuk deleted the feature/justice-email branch April 3, 2024 16:02
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