Gatsby Blog with Auth0 Authentication
To run, clone this repository and follow the instructions below.
Pre-requisites for Gatsby
Node & NPM
If you don’t have
npm installed, check out nodejs.org and install the correct version for your operating system.
Sign Up for Auth0
Set Up a Client App
- Go to your Auth0 Dashboard and click the "create a new client" button.
- Name your new app, select "Single Page Web Applications", and click the "Create" button.
- In the Settings for your new Auth0 client app, add
http://localhost:8000/callbackto the Allowed Callback URLs.
- Click the "Save Changes" button.
- If you'd like, you can set up some social connections. You can then enable them for your app in the Client options under the Connections tab. The example shown in the screenshot above utilizes username/password database, Facebook, Google, and Twitter.
Note: Under the OAuth tab of Advanced Settings (at the bottom of the Settings section) you should see that the JsonWebToken Signature Algorithm is set to
RS256. This is the default for new clients. If it is set to
HS256, please change it to
RS256. You can read more about RS256 vs. HS256 JWT signing algorithms here.
Modify auth util
src/utils/auth.js and replace
<your-client-id> with your Auth0 domain prefix and your client ID, found on your client dashboard.
Run the app