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::RATE_LIMIT_STORE
Instance Method Summary collapse
Methods included from ControllerPolicy
all_controllers, authenticated_controllers, public_controllers, register, registry_snapshot, reset_registry!
Instance Method Details
#start ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/controllers/standard_id/api/passwordless_controller.rb', line 23 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 |