Skip to main content

approve_device_verification

Function approve_device_verification 

Source
pub async fn approve_device_verification(
    pool: Data<PgPool>,
    body: Json<DeviceDecisionBody>,
    user: AuthUser,
) -> ControllerResult<HttpResponse>
Expand description

Handles POST /device_verification/approve.

Session-authed. Persists the user’s consent via the same OAuthUserClientScopes::insert the web consent flow uses (consent is always recorded — never short-circuited on a pre-existing grant), then marks the device code approved and bound to the signed-in user.