Skip to content

feat: endpoint for migrating from Auth0-based account to AAF (AAI-893) - #303

Merged
marius-mather merged 21 commits into
aaf-devfrom
feat/auth0-to-aaf-migration
Oct 26, 2026
Merged

marius-mather merged 21 commits into
aaf-devfrom
feat/auth0-to-aaf-migration

Conversation

@marius-mather

@marius-mather marius-mather commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Description

AAI-893: endpoints for migrating an existing user from a non-institutional email to an AAF email. Steps involved are:

  • Portal calls /aaf/migrate/auth0-to-aaf endpoint: creates a migration request, returns a migration_id
  • Portal redirects user to login via AAF, including the migration_id param with the login request
  • Auth0 action calls /aaf/migrate/auth0-to-aaf/complete endpoint to complete linking
  • Backend calls Auth0's /continue endpoint to complete the login

Changes

  • AccountMigrationRequest model to record pending migrations
  • Database migration for the new model
  • /aaf/migrate/auth0-to-aaf endpoint
  • /aaf/migrate/auth0-to-aaf/complete endpoint
  • Unit tests

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have added unit / integration tests that prove my fix is effective or that my feature works
  • I have run all tests locally and they pass
  • I have updated the documentation (if applicable)
  • [ ] For any new secrets, I have updated the shared spreadsheet and the GitHub Secrets.

How to Test Manually (if necessary)

Run uv run pytest

Comment thread routers/aaf.py Resolved
Comment thread routers/aaf.py Resolved
Comment thread schemas/aaf_migration.py Resolved

@amandazhuyilan amandazhuyilan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall looks good and easy to follow - just a few nit picks on docs and file naming

@amandazhuyilan amandazhuyilan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good now thanks!

@marius-mather
marius-mather merged commit b7079c0 into aaf-dev Oct 26, 2026
4 checks passed
@marius-mather
marius-mather deleted the feat/auth0-to-aaf-migration branch October 26, 2026 02:33
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