tor.us - bills itself as "authentication abstracted for the decentralized ecosystem". Give your users a smooth familiar onboarding experience by letting them sign up with google email accounts and other familiar OAuth providers.
Built and designed to be trustless, users’ identities are not controlled by any central authority, which means that your user owns the keys.
This boilerplate allows you to get tor.us up and running with Gatsby super easily. Just follow these simple steps:
-
Set up your Google OAUTH ID
First get your new GATSBY_GOOGLE_CLIENT_ID by creating an OAuth 2.0 client ID here, setting 'Authorized redirect URIs' to http://localhost/8000/serviceworker/redirect
-
Start developing.
Go to the Torus Developer Group And request a custom verifier be set up, giving them your Google client id
-
Get the friendly torus folks to set up a custom verifier for you
Make a copy of .env.example called .env.development and add the values that you acquired in the first 2 steps above:
GATSBY_GOOGLE_CLIENT_ID GATSBY_VERIFIER_NAME
Now you're ready to go!
-
Open the source code and start editing!
Your site is now running at
http://localhost:8000
!Note: You'll also see a second link:
http://localhost:8000/___graphql
. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.Open the
my-default-starter
directory in your code editor of choice and editsrc/pages/index.js
. Save your changes and the browser will update in real time!
There is a gotcha for building at the Torus library isn't designed for server side rendering, so you need to lazy load all torus components as we have already done for src/components/login.js, otherwise you will get an error saying btoa is undefined or similar.
This should work as is... Lucky you!