react-social-login icon indicating copy to clipboard operation
react-social-login copied to clipboard

Adding prompt?

Open runar-rkmedia opened this issue 6 years ago • 2 comments

I tried adding prompt as a prop for google, but was unable to get it working. The log in itself works great, but the prompt-prop is not working.

        <SocialLogin
          provider="google"
          appId="..."
          onLoginSuccess={loginResponse}
          prompt="select_account"
        >
          GOOGLE
        </SocialLogin>

runar-rkmedia avatar Apr 11 '18 13:04 runar-rkmedia

SocialLogin strips off all the props which aren't recognized by react-social-login. I can consider including that props but could you share a little more detail? AFAIK, even without that Google prompt for login however you might be facing error "User already connected". Could you please confirm?

deepakaggarwal7 avatar Feb 28 '21 17:02 deepakaggarwal7

const GoogleAuth = window.gapi.auth2.getAuthInstance() const options = { prompt: "select_account" } console.log('GoogleAuth') GoogleAuth.signIn(options).then( () => checkLogin().then(resolve, reject), (err) => reject(rslError({ provider: 'google', type: 'auth', description: 'Authentication failed', error: err })) )

@deepakaggarwal7

jngdal avatar Nov 26 '21 10:11 jngdal