Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mpwsh/actix-portier
Portier authentication + actix sessions + handlebars templates
https://github.com/mpwsh/actix-portier
Last synced: 10 days ago
JSON representation
Portier authentication + actix sessions + handlebars templates
- Host: GitHub
- URL: https://github.com/mpwsh/actix-portier
- Owner: mpwsh
- License: apache-2.0
- Created: 2023-05-01T05:26:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-07T01:05:44.000Z (10 days ago)
- Last Synced: 2024-11-07T02:16:46.900Z (10 days ago)
- Language: Rust
- Size: 134 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
### Description
Actix web using [Portier](https://portier.github.io) for authentication and Handlebars templates to render HTML.
### Usage
Start redis (for session persistence) using `docker-compose`.
```bash
docker-compose up -d
```Update [conf/local.yaml](conf/local.yaml) and/or [conf/base.yaml](conf/base.yaml) to suit your needs and start the server.
```bash
cargo run
```Access the homepage at `127.0.0.1:8000`.
Available endpoints:
- [/](http://127.0.0.1:8000/login)
- GET - [/login](http://127.0.0.1:8000/login)
- POST - [/login](http://127.0.0.1:8000/login)
- POST - [/claim](http://127.0.0.1:8000/claim) - Expects Form with `id_token`
- GET - [/dashboard](http://127.0.0.1:8000/dashboard)
- GET - [/whoami](http://127.0.0.1:8000/whoami)
- GET - [/health](http://127.0.0.1:8000/health)
- GET - [/logout](http://127.0.0.1:8000/logout)
- POST - [/logout](http://127.0.0.1:8000/logout)### Credits
Most of the code comes from the awesome [zero-to-production](https://github.com/LukeMathWalker/zero-to-production) repository, by [LukeMathWalker](https://twitter.com/algo_luca).
HTML Forms are adapted from this [Minimal Login Form](https://codepen.io/rikosteo/pen/vwrwMe) by [Thodoris Thomaidis](https://codepen.io/rikosteo)