1

I am using react-google-login for my react app. Here is my code

    <GoogleLogin
    clientId="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com"
    buttonText="Google"
    render={renderProps => (
    <button onClick={renderProps.onClick} className='google-login-button'>
    <img src={GoogleButton}/>
    </button>
    )}
    onSuccess={this.googleResponse}
    onFailure={() => console.log('error')}
/>

What I want is, Only the Gsuit users will be able to signin/up. Like someone with Gmail should not get the access.

moshfiqrony
  • 4,303
  • 2
  • 20
  • 29
  • Hey Rony, do you mean people without Gmail should not get access if that's the case then you will need to edit the question – walugembe peter Mar 24 '20 at 09:27
  • No, I mean there are two type of gmail user. one is general gmail user Like xxxx@gmail.com, But there is Gsuit user. I want only the gsuit users to login – moshfiqrony Mar 24 '20 at 09:30

1 Answers1

0

You can try out with hostedDomain props of GoogleLogin if not tried yet. I found this relevant Restrict access to google login. Or you can follow this thread bhai.Gsuit Restriction

Riftabin Kabir
  • 165
  • 1
  • 2
  • 14