How to get Identity work for local development

I’ve added the identity and it works nicely when deployed. I can access the user via netlifyIdentity.currentUser(). How do I make it work for localhost?

Hey @abtx,

The Identity Widget Readme has some useful pieces on this. I’ve linked specifically to the ‘Localhost’ section though there’s also the following advice in the FAQ:

If you experience a 404 while testing the Netlify Identity Widget on a local environment, you can manually remove the netlifySiteURL from localStorage by doing the following in the console.


Hope this helps!

Thanks @Pie. Can you confirm this repo to actually work with Google oAuth? I think last time I tried it didn’t work in the React demo.

Is there a working example for Netlify Identity with React Router? I’ve an issue that seems to be related to using NI with RR. I’m not sure what is the issue because I can login with email and password and everything works alright. As to login with Google, I can login on Safari and everything works fine. But Chrome and Firefox I click on Google, it briefly gets redirected, gets back to my app and the user is null.

Hey @abtx,

OAuth will work however not in devmode (Email/password still works in devmode)!

@Pie thanks for the heads up. React Netlify Identity Widget does the job for me then. Cheers !

1 Like