Code Monkey home page Code Monkey logo

Comments (5)

nehatkkhan786 avatar nehatkkhan786 commented on September 27, 2024 1

https://www.npmjs.com/package/@react-oauth/google?activeTab=readme guys try this library working fine. I just fixed my issue with this library.

from react-google-login.

KasunSKarunasekara avatar KasunSKarunasekara commented on September 27, 2024

Facing the same issue. Any solutions?

from react-google-login.

nehatkkhan786 avatar nehatkkhan786 commented on September 27, 2024

I am also facing the same issue guys. Did you get any alternate solution? Please help me out

from react-google-login.

asinha0609 avatar asinha0609 commented on September 27, 2024

Facing the same issue on production, working fine for windows but MacBook.

from react-google-login.

nehatkkhan786 avatar nehatkkhan786 commented on September 27, 2024

https://www.npmjs.com/package/@react-oauth/google?activeTab=readme guys try this library working fine. I just fixed my issue with this library.

import { useGoogleLogin } from '@react-oauth/google';
const login = useGoogleLogin({ onSuccess: async(response)=>{ try { const {data} = await axios.post('backendurl/', {'access_token':response.access_token}, { headers:{ 'content-type': 'application/json' } }) dispatch({ type :'USER_LOGIN', payload :data }) localStorage.setItem('userLoginDetails', JSON.stringify(data)) navigate(-1) toast.success('Login in Successfully ') console.log(response) } catch (error) { toast.error('Something Went Wrong') } } })

` <Button size='small' startIcon={<Box component='img' src={GoogleLogo} sx={{width:40, height:40}}/>} variant='contained' sx={{backgroundColor:'black', color:'white' , ':hover':{backgroundColor:'black'}}} onClick = {()=>{login()}}>
Sign in with Google
``
and call the above login function on the custom button it will work fine. Just now I fixed my stuff with this package .

from react-google-login.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.