mix skua.gen.auth (Skua v0.15.0)

Copy Markdown View Source

Generates an authentication system by running mix phx.gen.auth and then applying Skua's flow-specific changes. The generated code is yours to edit.

mix skua.gen.auth --auth magic_link   # default — Phoenix's magic-link flow
mix skua.gen.auth --auth otp          # 6-digit one-time-code login
mix skua.gen.auth --auth password_otp # password + OTP, both on the login screen
mix skua.gen.auth --auth custom       # stock phx.gen.auth, nothing extra

Flags:

  • --otp-length (otp/password_otp) — code length, default 6 (8 recommended for high-value apps).
  • --otp-expiry — code validity in minutes, default 10.

Idempotent: re-running detects an existing Accounts context and skips the base generation.