mozilla / fx-private-relay

Keep your email safe from hackers and trackers. Make an email alias with 1 click, and keep your address to yourself.
https://relay.firefox.com
Other
1.44k stars 166 forks source link

MPP-3730: Fix login redirects in dev/stage/prod #4747

Closed rafeerahman closed 1 month ago

rafeerahman commented 1 month ago

Closing this PR. find_file_at_path does not return None.

This PR fixes MPP-3730.

Bug description

These URLs works, redirects to the API profile page after login:

https://dev.fxprivaterelay.nonprod.cloudops.mozgcp.net/accounts/fxa/login/?next=/api/v1/profiles/

https://stage.fxprivaterelay.nonprod.cloudops.mozgcp.net/accounts/fxa/login/?next=/api/v1/profiles/

https://relay.firefox.com/accounts/fxa/login/?next=/api/v1/profiles/

Locally, accounts/fxa/login/?next=/faq/ works. It does not work in stage/dev/prod because we use staticfiles, redirects to the dashboard instead of the FAQ and emits a Sentry error:

https://dev.fxprivaterelay.nonprod.cloudops.mozgcp.net/accounts/fxa/login/?next=/faq/

https://stage.fxprivaterelay.nonprod.cloudops.mozgcp.net/accounts/fxa/login/?next=/faq/

https://relay.firefox.com/accounts/fxa/login/?next=/faq/

Sentry Issue: RELAY-JH

Screenshot (if applicable)

How to test

  1. push to dev server and go to https://dev.fxprivaterelay.nonprod.cloudops.mozgcp.net/accounts/fxa/login/?next=/faq/

  2. Verify you are redirected to the faq page.

Checklist (Definition of Done)

sentry-io[bot] commented 1 month ago

๐Ÿ” Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

๐Ÿ“„ File: privaterelay/allauth.py

Function Unhandled Issue
is_safe_url AttributeError: 'NoneType' object has no attribute 'get_response' /ac...
Event Count: 3

Did you find this useful? React with a ๐Ÿ‘ or ๐Ÿ‘Ž