Error creating OAuth configuration when switching accounts on creation page
Bug Description
When trying to create a client configuration OAuth it fails when you need to switch accounts on the creation page. If you're logged into Google Chrome on your private account, but need to switch to your work account on the OAuth creation page, it fails. It used to work fine before.
Steps to reproduce
- In Google Chrome, be logged in with one account you're synchronising with.
- In Wordpress, click creating a client configuration on developers.google.com/web/sitekit
- Switch to a different Google account in the menu on the top right. I.e from your private account to your work account.
- Page doesn't load properly. It used to work previously, before the OAuth error in #561
Screenshots
Screen recording of the error. https://digitelle.tinytake.com/tt/Mzc5OTk1MV8xMTU5ODY4Ng
Additional Context
- PHP Version: 7.3
- OS: Windows
- Browser: Chrome
- Plugin Version Versjon 1.0.0-beta.1.0.7
- Device: PC
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
Changelog entry
@kaelhoel Site Kit pre-populates the OAuth information based on the logged in users profile, before then creating a project in Google Cloud Console based on that input. If users switch Google accounts at that stage it's normal and intended behaviour that users need to fill in project details as the information cannot be passed to another Google account.
While the Site Kit setup and authentication process will change in future releases previous versions had the same verification flow. For the moment I would suggest changing your logged in Google profile before obtaining your credentials via the following URL (change the URL references to match your own site): https://developers.google.com/web/site-kit/?sitename=yourwebsitecom&siteurl=https://yourwebsite.com
@jamesozzie It was actually working fine before in this way, that the page would automatically update to the correct information, when you switched accounts on the OAuth creation page. Then there was this issue described in #561 and after that it was no longer possible. I have resorted to using Firefox to install Google Site Kit, as it's less of a hassle than having to log out of my synchronised account in Chrome.
@kaelhoel The process is the same using Firefox, if you switch Google profiles on the OAuth credentials generation page (https://developers.google.com/web/site-kit?sitename=sitename*&siteurl=https://****.com) you will need to manually create the project.
The issue you referenced was in relation to a separate issue, which was impacting the OAuth credentials generation overall, irrespective of switching Google accounts. If you want to check previous versions of the plugin you can check them out here.
@jamesozzie With other browsers I'm not synced to a personal account, like I am in Google Chrome. So when I access the OAuth creation page, I am able to login to my work account before it serves me the page. Which eliminates the problem.