https://github.com/bigardone/passwordless-auth
Sample project of password-less & database-less socket authentication with Elixir, Phoenix and Elm.
https://github.com/bigardone/passwordless-auth
databaseless elixir-lang elm-lang password-less-authentication phoenix-framework
Last synced: about 1 year ago
JSON representation
Sample project of password-less & database-less socket authentication with Elixir, Phoenix and Elm.
- Host: GitHub
- URL: https://github.com/bigardone/passwordless-auth
- Owner: bigardone
- Created: 2018-06-03T10:52:53.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-01T07:34:40.000Z (over 7 years ago)
- Last Synced: 2025-03-24T06:51:33.859Z (over 1 year ago)
- Topics: databaseless, elixir-lang, elm-lang, password-less-authentication, phoenix-framework
- Language: Elixir
- Homepage:
- Size: 246 KB
- Stars: 43
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PasswordlessAuth
This is the demo project for a new series I'll be writing on how to authenticate Phoenix socket connections with a password-less and database-less approach, inspired by Slack's magic link authentication.
## Scenario
Have you ever found yourself adding HTTP basic authentication to a small admin panel of some sort? Have you ended up changing it for something way more complicated? How many times did this change leave you with a feeling of unnecessary over-engineering? This small experiment relies on OTP, Phoenix Token, and email sending, to build up a secure and straightforward authentication system for a Phoenix socket connection, used by a small Elm SPA application.
## Why password-less and database-less?
Because, why not? I wanted it to be as simple as possible, taking advantage of some of the features which make Elixir and Phoenix so awesome.
## Tutorial
1. [Project setup and the initial functionality for storing and verifying authentication tokens](http://codeloveandboards.com/blog/2018/06/09/elixir-and-phoenix-basic-passwordless-and-databaseless-authentication-pt-1)
2. [Sending authentication link emails and the user socket connection](http://codeloveandboards.com/blog/2018/06/20/elixir-and-phoenix-basic-passwordless-and-databaseless-authentication-pt-2)
3. [Setting up webpack as our asset bundler and the Elm single-page application](http://codeloveandboards.com/blog/2018/09/01/elixir-and-phoenix-basic-passwordless-and-databaseless-authentication-pt-3)
## Running the project
To start your Phoenix server:
* Install dependencies with `mix deps.get`
* Install Elm dependencies with `cd apps/passwordless_auth_web/assets/elm && elm package install`
* Install Node.js dependencies with `cd apps/passwordless_auth_web/assets && npm install`
* Start Phoenix endpoint with `mix phx.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
## Final result

Beautiful icons by https://icons8.com