Class: StandardId::Api::PasswordlessController
- Inherits:
-
BaseController
- Object
- ActionController::API
- BaseController
- StandardId::Api::PasswordlessController
- Includes:
- PasswordlessStrategy
- Defined in:
- app/controllers/standard_id/api/passwordless_controller.rb
Constant Summary
Constants included from PasswordlessStrategy
PasswordlessStrategy::STRATEGY_MAP
Instance Method Summary collapse
Methods included from ControllerPolicy
all_controllers, authenticated_controllers, public_controllers, register, registry_snapshot, reset_registry!
Instance Method Details
#start ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/controllers/standard_id/api/passwordless_controller.rb', line 8 def start raise StandardId::InvalidRequestError, "username, email, or phone_number parameter is required" if start_params[:username].blank? strategy_for(start_params[:connection]).start!(start_params) render json: { message: "Code sent successfully" }, status: :ok end |