-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Google OAuth2 authentication flow #935
Conversation
46ffe00
to
c4d01da
Compare
@adekbadek I moved the OAuth2 section to the bottom of the dashboard. Not quite sure but
Do you mean the actual connection, or the client ID/secret? |
The connection - it's better after your changes, but still it's an odd item among links to wizards. |
What happens after you click on the authorisation dashboard item? |
Absolutely nothing |
Oh ok I see. |
Definitely, but that's on top of the dashboard/post-onboarding UI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really like the consolidation of the Google Services authorizations into a single class, and the DRY-ability(?) it enables. I have a few nits below but nothing blocking, so 👍
Co-authored-by: Derrick Koo <[email protected]>
🎉 This PR is included in version 1.37.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.37.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Adds an OAuth2 authentication flow, as a preparation for the upcoming GAM integration.
Currently, Site Kit's authorisation is reused to access user's GA data. Site Kit does not support the scopes necessary to access GAM data, so Newspack has to roll its own authorisation for this purpose.
UI: I have made it very lightweight purposefully, since this PR is quite large as it is. The UI should probably live in some kind of settings view. cc @thomasguillot
How to test the changes in this Pull Request:
<test-site->/wp-admin/admin.php?page=newspack
(e.g.https://newspack.test/wp-admin/admin.php?page=newspack
) as an Authorized redirect URI.NEWSPACK_GOOGLE_OAUTH_CLIENT_ID
andNEWSPACK_GOOGLE_OAUTH_CLIENT_SECRET
environment variables inwp-config.php
_newspack_google_oauth
user meta from the DBOther information: