Skip to content

AAI-223 add an endpoint to get registration info based on user's email address#27

Merged
marius-mather merged 8 commits into
mainfrom
signup-get-info
Jun 10, 2025
Merged

AAI-223 add an endpoint to get registration info based on user's email address#27
marius-mather merged 8 commits into
mainfrom
signup-get-info

Conversation

@marius-mather

@marius-mather marius-mather commented Jun 6, 2025

Copy link
Copy Markdown
Collaborator

Description

AAI-223: there doesn't seem to be a good way to pass the registration info from Auth0 directly to our registration page. Instead, if we want to have app-specific email verification pages (and go directly from them to app login), it looks like we have to:

  • Pass the email from Auth0 to the verification page (Auth0 allows this, although it's not well documented)
  • Do a lookup from the frontend verification page - call this new API to get the registration source (if it's available)

TODO:

  • Document how we pass email from Auth0 to the verification page - requires using the management API to change a setting

Possible issues

  • Are there privacy/security concerns around having an endpoint that (theoretically) allows you to check whether a user exists in the system based on email address? Have tried to minimize the amount of info returned, but if the response is anything other than the default of "biocommons", you would know the user is in the system

Changes

  • Add /utils/registration_info?user_email=user@example.com endpoint
  • Look up user by email in the management API

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)

How to Test Manually (if necessary)

Run uv run pytest

amandazhuyilan
amandazhuyilan previously approved these changes Jun 10, 2025

@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 - thanks for adding this !

Comment thread routers/utils.py Outdated
Co-authored-by: Amanda Zhu <amandazhuyilan@gmail.com>
@amandazhuyilan amandazhuyilan self-requested a review June 10, 2025 03:58
@marius-mather marius-mather merged commit 0a39071 into main Jun 10, 2025
1 check passed
@amandazhuyilan amandazhuyilan deleted the signup-get-info branch June 19, 2026 03:21
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