Brize Auth :construction:
A simple to use async basic authentication and session library for MySql and SurrealDB.
Still a WIP, not in a usable state. Roadmap at bottom.
Setup
Start Development Database, Non-Persist, No-Auth
Usage
use ;
Config
Brize Auth has some opinions, but can be configured to your use case.
use ;
let config = new
// Set your preferred database tech for the credentials table
.set_credentials_gateway
// Set your session type, TableSession, JWT, or None to disable and the duration
.set_session_type;
// Override the default session GatewayType from above
.set_session_gateway
let auth = new.await;
Roadmap
- User Registration
- Create user credentials if none exist
- Deny if user credentials does exist
- Return credentials foreign key
- Login
- Match user credentials
- Return session token if matched (if sessions enabled)
- Deny user if no match
- Hash password
- Session Management
- Create session
- Validate session
- Delete sessions based on age and other edge cases
- Logout
- Match user credentials and/or session token
- Delete users session
- Change Credentials
- Update user_identity
- Update user_password
- Decide what to return
- Delete User
- Remove credentials from database