Open AKzar1el opened 1 year ago
can you share it ? at least the log out part because im stuck there :(
I am also stuck there but you can find it in the comment section he made another video about that
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Amr Ismail Abdelkader Mohammed @.> Sent: Sunday, November 20, 2022 10:48:36 PM To: adrianhajdin/project_shareme_social_media @.> Cc: Subscribed @.***> Subject: Re: [adrianhajdin/project_shareme_social_media] Solution for google OAuth new update (Issue #27)
can you share it ? at least the log out part because im stuck there :(
— Reply to this email directly, view it on GitHubhttps://github.com/adrianhajdin/project_shareme_social_media/issues/27#issuecomment-1321251445, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASJ2DDU7XVBYYURPKR47EETWJKMDJANCNFSM6AAAAAAR3ZZ37Y. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Solution to Logout issue
<GoogleLogout clientId={process.env.REACT_APP_GOOGLE_API_TOKEN} render={(renderProps) => ( <button type="button" className=" bg-white p-2 rounded-full cursor-pointer outline-none shadow-md" onClick={renderProps.onClick} disabled={renderProps.disabled}
)} onLogoutSuccess={logout} cookiePolicy="single_host_origin" />
That's the old way ... Google changed that
I simply created a button for logout and did this on onClick of this button.
const logout = ( ) =>{ localStorage.clear(); sessionStorage.clear();
navigate('/login'); }
It worked for me.
I have a functional template of your code with the new standard of implementing OAuth and decoding it with jwt. I would love to contribute if you give me the option.