I have two domains: let's call them A (currently in production) and B (a test domain).
For reasons I can't disclose, I need to switch from A to B while keeping everything else the same except for the domain name.
The biggest concern is OAuth login via Google.
Currently:
- The Google OAuth consent screen has been submitted and approved with A as the application homepage.
- B is already included in the authorized domains list in this application.
- I have separate client IDs issued for A and B. (but same application)
My Plan:
- Update the application homepage in the Google OAuth consent screen to B and go through the review process again.
- In the OAuth settings for A's client ID, add B to the Authorized JavaScript Origins and Authorized Redirect URIs.
- In the OAuth settings for B's client ID, add A to the Authorized JavaScript Origins and Authorized Redirect URIs.
- Keep the client ID and secret unchanged in both the production and development servers (since I want existing users from A to continue using their accounts on B without any issues).
Concerns:
Once step 1 is completed (changing the consent screen to B and getting approval), will OAuth stop working on A?
Ideally, I want to transition seamlessly without breaking OAuth authentication on A before fully switching to B. (One or two hours is fine.)
Is my approach correct? If not, what would be the best way to handle this transition?