Add authentication to your React app in 5 minutes with useAuth
summary
Demonstrates adding authentication to a blank Gatsby app in under five minutes using the useAuth hook, with working login/logout and session restoration from localStorage. Implements providers for Netlify Identity and Auth0, shows the required callback page, and uses xstate for background state so no context provider is needed. Config switches require only provider config and a navigate function. Open source extensibility is promised so additional providers can be added.
AI-written summary · about
chapters (9)
- 0:00The challenges of auth
- 1:20Security and data storage
- 3:05Choosing an auth provider
- 4:41Frontend auth implementation
- 6:12Introducing useAuth
- 6:56Setting up Netlify Identity
- 8:39Building UI with useAuth
- 11:36Switching to Auth0
- 13:04Finalizing auth and next steps
related talks
07mInstall Auth to your React up in 4 minutes
08mAdd login to your React App in no time
33mAuth for React.js APP
12mReact and Auth0 working together to build more secure apps
09mBeyond the Login Page: Authentication in Next.js
01h 02mMastering Secure Login Mechanisms for React Apps
14mLeverage Hybrid Apps for Secure Auth
12mAuthentication and Authorization in Next.js
