Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up for Free

Add Authentication to Your Gatsby Apps With Auth0 (Livestream)

Jason Lengstorf
March 21st, 2019

A common challenge when building apps is setting up authentication. If our apps have user-specific data, we need a way to secure that data and identify our users so they can access their own information.

Authentication in Gatsby

We regularly get questions about how to add authentication to Gatsby, and while we have simple examples that wouldn’t help in a production app and the more complex logic of our store, we don’t have a straightforward, “here’s how to add authentication for a user account page in Gatsby” example.

On a recent livestream, Ado Kukic helped me create an example for setting up auth for a Gatsby account page.

This is part of the Learn With Jason series, which streams live on Twitch every Thursday at 9 am Pacific.

On the stream, we covered:

  1. How to create dynamic routes in Gatsby
  2. How to use Auth0 to require a user login to view certain areas of a Gatsby site
  3. How to store user tokens in a secure way
  4. How to keep users logged in between page loads securely

The code we built is available on GitHub and will serve as a great starting point if you need to create a Gatsby app with user accounts.

Watch future livestreams

There’s a new livestream every Thursday at 9 am Pacific. The streams are even more fun live with the chat, so join in and let’s learn together!

  • Click the “follow” button on my Twitch account to get notified when streams start
  • Check the “Upcoming Streams” section to learn who’ll be joining me to teach us
  • Send me ideas on Twitter for who you’d like to see on the stream

See you on the next stream!

Share on TwitterShare on LinkedInShare on FacebookShare via Email

Developer. Occasional designer. Process and culture architect. Mediocre bartender. Blogs at lengstorf.com

Follow Jason Lengstorf on Twitter

Tagged with apps, authentication, getting-started, livestreamView all Tags

Talk to our team of Gatsby Experts to supercharge your website performance.

Contact Gatsby Now
© 2024 Gatsby, Inc.