MomenSherif / react-oauth

Google OAuth2 using the new Google Identity Services SDK for React 🚀
https://www.npmjs.com/package/@react-oauth/google
MIT License
1.13k stars 141 forks source link

README: add useGoogleLogin overrideScope prop #338

Open NeodymiumFerBore opened 8 months ago

NeodymiumFerBore commented 8 months ago

Was wondering why my app was requesting user info by default.

Both implicit and code flow interfaces have this prop. It is optional, so defaults to false.

useGoogleLogin set requested scopes regarding the given scope and overrideScope props. If overrideScope is false, then email, profile and openid are included in requested scopes. https://github.com/MomenSherif/react-oauth/blob/5c5ab23e93945bea9d372cdb05e8ff17b944fe30/packages/%40react-oauth/google/src/hooks/useGoogleLogin.ts#L99-L102

This PR adds overrideScope in the useGoogleLogin table in README.

changeset-bot[bot] commented 8 months ago

⚠️ No Changeset found

Latest commit: c9915c67ce1bd2f29ccd0013b3c9c8ffb842611a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **react-oauth** | ⬜️ Ignored ([Inspect](https://vercel.com/momensherif/react-oauth/5xxfHDhACPBH8Xt2ucQV2mBYts2J)) | [Visit Preview](https://react-oauth-git-fork-neodymiumferbore-patch-1-momensherif.vercel.app) | | Mar 18, 2024 0:33am |