Class: StandardId::Api::PasswordlessController
- Inherits:
-
BaseController
- Object
- ActionController::API
- BaseController
- StandardId::Api::PasswordlessController
- Includes:
- PasswordlessFlow
- Defined in:
- app/controllers/standard_id/api/passwordless_controller.rb
Constant Summary
Constants included from PasswordlessStrategy
PasswordlessStrategy::STRATEGY_MAP
Constants included from RateLimitHandling
RateLimitHandling::DEFAULT_RETRY_AFTER, RateLimitHandling::RATE_LIMIT_STORE
Instance Method Summary collapse
Methods included from RateLimitHandling
login_per_email, login_per_ip, resolve_login_alias
Methods included from ControllerPolicy
all_controllers, authenticated_controllers, public_controllers, register, registry_snapshot, reset_registry!
Instance Method Details
#start ⇒ Object
30 31 32 33 34 35 36 |
# File 'app/controllers/standard_id/api/passwordless_controller.rb', line 30 def start raise StandardId::InvalidRequestError, "username, email, or phone_number parameter is required" if start_params[:username].blank? generate_passwordless_otp(username: start_params[:username], connection: start_params[:connection]) render json: { message: "Code sent successfully" }, status: :ok end |