BurakGur / google-one-tap

Google One Tap Login
https://google-one-tap-taupe.vercel.app/
60 stars 10 forks source link

Hey I'm facing origin not allowed issue in next js #2

Closed arnab15 closed 2 years ago

arnab15 commented 2 years ago

image I have used it in nextjs this way . const options = { client_id: "My client id", // required auto_select: false, // optional cancel_on_tap_outside: false, // optional context: "signin", // optional };

useEffect(() => {
    googleOneTap(options, (response) => {
        // Send response to server
        console.log(response);
    });
}, []);

is there any other solution workaround for this issue?
BurakGur commented 2 years ago

This is not package issue. This is authorization problem. Please go to Google Console > Credentials > Your Web Application Project and add your project url (Ex: http://localhost:3000) to Authorized JavaScript origins.

I also added nextjs example and demo to project folder.