mix ash_authentication_bankid. install
(ash_authentication_bankid v0.1.3)
View Source
Installs BankID authentication into a Phoenix application using Ash Authentication.
Usage
mix ash_authentication_bankid.installOptions
--user,-u- The user resource module (default: auto-detected from AshAuthentication)--domain,-d- The Ash domain module (default: auto-detected from user resource)--web-module,-w- The Phoenix web module (default: YourAppWeb)
What this installer does
- Adds BankID attributes to your User resource (personal_number, given_name, surname, etc.)
- Configures the BankID authentication strategy
- Creates a BankIDOrder resource for tracking authentication sessions
- Creates a BankIDLive LiveView for the authentication UI
- Creates an AuthCallbackController for session management
- Adds necessary routes to your router
- Ensures the email field allows nil (BankID doesn't provide emails)
- Generates database migrations
After installation
Run the following commands:
mix deps.get
mix ash.codegen
mix ecto.migrateThen start your server and visit:
http://localhost:4000/auth/user/bank_id