class WarpEngine::Api::Auth::DevicesController
Starts the device authorization grant a client without a browser of its own uses to sign in.
Public Instance Methods
Source
# File app/controllers/warp_engine/api/auth/devices_controller.rb, line 22 def create grant = service.request(client_name: params[:client_name]) render json: WarpEngine::DeviceGrantSerializer.render_as_hash( grant, verification_url: service.verification_url(base_url: request.base_url) ) end
POST /api/auth/device.
- client_name
-
optional name of the device, shown in the personโs account
Creates a WarpEngine::DeviceGrant and renders it through WarpEngine::DeviceGrantSerializer: the device and user codes, the verification URL to open, the polling interval and the seconds until expiry.