react-oauth icon indicating copy to clipboard operation
react-oauth copied to clipboard

GoogleLogin to accept scope attribute

Open miradnan opened this issue 2 years ago • 3 comments

Hey, Thanks for the package. Its really helpful. One thing I came across is the GoogleLogin that doesn't have scope attribute. Is there a way you could add scope attribute to it? That way it will be same as useGoogleLogin hook.

<GoogleLogin
  onSuccess={credentialResponse => {
    console.log(credentialResponse);
  }}
  onError={() => {
    console.log('Login Failed');
  }}
  useOneTap
/>;

miradnan avatar Apr 17 '23 05:04 miradnan

Hello,

GoogleLogin used for seamless authentication, the personalized button from google isn't allowed to pass scopes for authorization

you will need to use the custom hook, with your custom button to use scopes

MomenSherif avatar Apr 19 '23 00:04 MomenSherif

@MomenSherif Thanks lot for the update to google auth package, I have same issue how do i pass the scopes and get the access token and reference token ?

adventuretocode avatar May 03 '23 10:05 adventuretocode

@adventuretocode you will need to use the custom hook for authorization scopes

MomenSherif avatar May 03 '23 10:05 MomenSherif