Skip to content

Commit

Permalink
Don't raise exception if we have an invite code, that'll be checked o…
Browse files Browse the repository at this point in the history
…n callback. (#512)
  • Loading branch information
MelissaAutumn authored Jul 3, 2024
1 parent fcd0389 commit 6d15127
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/appointment/routes/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def fxa_login(
try:
url, state = fxa_client.get_redirect_url(db, token_urlsafe(32), email)
except NotInAllowListException:
raise HTTPException(status_code=403, detail='Your email is not in the allow list')
if not invite_code:
raise HTTPException(status_code=403, detail='Your email is not in the allow list')

request.session['fxa_state'] = state
request.session['fxa_user_email'] = email
Expand Down

0 comments on commit 6d15127

Please sign in to comment.