AshAuthentication. BankID. Actions
(ash_authentication_bankid v0.1.3)
View Source
Business logic for BankID authentication actions.
This module provides the code interface for executing BankID authentication actions on user resources. It follows the same pattern as MagicLink.Actions.
Only the sign_in action is defined here, as initiate and poll are pure HTTP operations handled entirely by plugs.
Summary
Functions
Sign in or register a user using BankID authentication.
Functions
@spec sign_in(AshAuthentication.BankID.t(), map(), keyword()) :: {:ok, Ash.Resource.record()} | {:error, AshAuthentication.Errors.AuthenticationFailed.t()}
Sign in or register a user using BankID authentication.
This function calls the auto-generated sign_in action (CREATE with upsert) on the user resource. The SignInChange handles the actual BankID processing.
Parameters
strategy- The BankID strategy configurationparams- Parameters including theorder_refoptions- Options including context, tenant, etc.
Returns
{:ok, user}- User record with JWT token in metadata{:error, error}- Authentication failed error
Examples
iex> Actions.sign_in(strategy, %{"order_ref" => "abc123"}, [])
{:ok, %User{...}}