Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
) ## What are you changing? Checks for the users origin (domain) and sets the correct `redirect_uri` accordingly, i.e the `profile` subdomain if the page is loaded from `profile`, or default domain otherwise. ## Why? On a user's "Comments and Replies" page, e.g. https://profile.theguardian.com/user/id/101796494?page=1, the user doesn't appear signed in, even if they already are. This is because we kept getting returned an `OAuthError` <img width="1190" alt="Screenshot 2024-12-12 at 08 31 16" src="https://github.com/user-attachments/assets/eb2c55a4-7253-4755-bad6-028b34ef8df6" /> This is because the `redirect_uri` for performing OAuth on frontend is set to `https://www.theguardian.com/`, but the comments and replies page is on the `https://profile.theguardian.com/` domain, despite the code for this page living in [guardian/frontend](https://github.com/guardian/frontend/tree/main/identity) This meant when users went to this page, they don't appear to be signed in. ## Related Sibling PR in `identity-platform` to update our OAuth configuration: guardian/identity-platform#791
- Loading branch information