Skip to content
A front-end boilerplate with auth, in Gatsby, for the koa back end.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.eslintrc.json
.gitignore
.prettierrc
LICENSE
README.md
gatsby-browser.js
gatsby-config.js
gatsby-node.js
gatsby-ssr.js
package.json

README.md

gatsby-login

This is a front end boilerplate based on Gatsby. It started from the Gatsby auth tutorial, using the gatsby-starter-photo template, and was customized to work with the koa boilerplate back end. It demonstrates the basic auth capability of the koa boilerplate.

Installation and Usage

  • Install and run the koa boilerplate
  • Clone this repository git clone https://github.com/christroutner/gatsby-login
  • Install dependencies: npm install
  • Run development server: npm run develop
  • Build for production: npm run build

This is a simple demo. The homepage is a login form. And a profile page is accessible only if the user is logged in. The profile page displays the username and JWT of the logged in user.

  • Click on the Profile link in the nav bar. You will be redirected back to the home page, and can not access the private Profile page unless logged in.
  • Add a username and password then click the Create button to create a new user.
  • You will be logged in and taken to the Profile page.
  • Log Out. You will be redirected to the Homepage with the login screen.
  • Log In. You will be redirected to the Profile page.
You can’t perform that action at this time.