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

Support trn_token in sign in journeys #1292

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Support trn_token in sign in journeys #1292

merged 1 commit into from
Apr 23, 2024

Conversation

gunndabad
Copy link
Collaborator

@gunndabad gunndabad commented Apr 22, 2024

We want to support 'magic links' that we've emailed to people inviting them to AYTQ. This adds support for the trn_token parameter, as with the current ID solution. The token is associated with a TRN. If the verified last name and DOB match those on the teaching record for the token's TRN we automatically attach the user to the teaching record. If there's a discrepancy we fall back to the regular matching journey.

For now we're reaching directly into the ID database; normally we'd create APIs but this is temporary until we move all the tokens over from ID (at which point we'll likely need direct DB access any way). For testing this uses the EF in memory provider (setting up real DBs for testing this isn't worth it).

Much of this PR is refactoring to allow the Debug page to share some code in SignInJourneyHelper; TryApplyTrnToken is the meat of the changes.

@gunndabad
Copy link
Collaborator Author

@gunndabad gunndabad merged commit cdb8acb into main Apr 23, 2024
12 checks passed
@gunndabad gunndabad deleted the magiclink branch April 23, 2024 16:39
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