Skip to content

Gatsby Starter using Stytch for passwordless authentication

License

Notifications You must be signed in to change notification settings

kinsona/gatsby-starter-stytch

Repository files navigation

Gatsby Stytch

Gatsby Starter with Stytch

Overview

This starter creates a simple site with passwordless authentication, provided by Stytch. Users can sign up and log in with just an email address - no password needed!

Note: this starter uses Gatsby Cloud for an easy backend function to call the Stytch API. This function could be moved to a custom backend if you have or need one. See src/api/authenticate.js.

Check out the live demo deployed with Gatsby Cloud!

🚀 Quick start

  1. Create a Gatsby site.

    Use the Gatsby CLI to create a new site, specifying the minimal starter.

    # create a new Gatsby site using this starter
    gatsby new my-gatsby-site [https://github.com/kinsona/gatsby-starter-stytch]
  2. Sign up for Stytch and configure your new project

    Create a .env.development file, using .env_sample as a template.

    Copy the variables for your project out of the API Keys section of the Stytch dashboard:

    • STYTCH_PROJECT_ID
    • STYTCH_PUBLIC_TOKEN
    • STYTCH_SECRET
  3. Start developing.

    Navigate into your new site’s directory and start it up.

    cd my-gatsby-site/
    npm run develop
  4. Open the code and start customizing!

    Your site is now running at http://localhost:8000!

    Edit files in src/pages to see your site update in real-time! Logged-in users will see src/pages/index.js, while guests will see src/pages/login.js.

  5. (Optional) Build for Gatsby Cloud gatsby build

  6. Learn more

About

Gatsby Starter using Stytch for passwordless authentication

Resources

License

Stars

Watchers

Forks

Packages

No packages published