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

How to use GoogleLogin with fedcm #336

Open poorvasingh04 opened 8 months ago

poorvasingh04 commented 8 months ago

I am using GoogleLogin button

<GoogleLogin use_fedcm_for_prompt onSuccess={(credentialResponse) => { const { credential } = credentialResponse; if (credential) { //LOGIN USER } }} onError={() => { console.log("Signin with Google failed"); }} />

browser shows silent error getUserInfo() failed because the user has not yet used FedCM on this site with the provided IDP

What do I need to fix this issue?