View Source Fast.Auth behaviour (Fast v0.8.1)

Link to this section Summary

Link to this section Types

@type login_method() :: :password | :magic_link | :saml_sso

Link to this section Callbacks

Link to this callback

handle_login_failure(user, method, context)

View Source (optional)
@callback handle_login_failure(user :: any(), method :: login_method(), context :: map()) ::
  any()
Link to this callback

handle_login_success(user, method, context)

View Source (optional)
@callback handle_login_success(user :: any(), method :: login_method(), context :: map()) ::
  any()

Available features:

  • :passwords
  • :confirmable
  • :invitable
  • :magic_links
  • :saml_sso
  • :login_attempt_locking
  • ?

Opts:

  • :schema - The user account schema
  • :features - A subset of features.
Link to this callback

verify_login_allowed(user, method, context)

View Source (optional)
@callback verify_login_allowed(user :: any(), method :: login_method(), context :: map()) ::
  :ok | {:error, any()}

Link to this section Functions

Link to this function

ensure_fields_present!(atom, schema)

View Source
Link to this function

ensure_valid_features!(module, features)

View Source
Link to this function

raise_invalid_features!(module, invalid_features, unused_features)

View Source
Link to this function

raise_missing_fields!(feature, schema, missing_fields)

View Source