Login With Link aims to be the simplest, most lightweight authentication solution available.
It's a service that allows your users to authenticate via an emailed link - they're provisioned a JWT and redirected to your site where you can use that token to identify them.
This project uses Firebase for functions database storage and web hosting; it's an SPA using React / Chakra UI for frontend components, Navigo for routing and Browserify / Babel for building.
- Download this Git repo.
This project uses Firebase Functions (basically Google Cloud Functions) and Firebase Firestore - both of which can be run locally via the emulator.
- Install function deps:
cd functions; yarn; cd ..
- Make local copy of default DB contents:
yarn setup_emulator
(this copiesdefault_data
tofirebase_data
, where the emulator expects to find it) - Start the emulator:
yarn emulator
(most easily managed in its own terminal)
- Install web dependencies:
yarn
- Run build or watch process:
yarn build
oryarn watch
(for single or persistent building, respectively) - Start live refresh server:
yarn serve
(most easily managed in a different terminal to above)
deploy_all
deploys both the front and backends (it requires that you are authenticated, with permission for this Firebase project) - it runs deploy_functions
and deploy_hosting
- the latter builds the frontend first, with some env vars baked into the process for the production version of the site.