Skip to content
Scalekit Docs
Talk to an EngineerDashboard

Authorization

Authorization helpers for protected resources

Use auth helpers for authorization code exchange, token validation, and related login token flows on the Scalekit client.

These methods sit next to session management—use them when implementing hosted login callbacks and token checks.

clientAuthhttps://github.com/scalekit-inc/scalekit-sdk-node/blob/main/src/auth.ts
#asyncupdateLoginUserDetails

Updates user details for an ongoing authentication request.

paramconnectionIdstring

The SSO connection ID being used for authentication

paramloginRequestIdstring

The unique login request identifier from the auth flow

paramuserUserInput

User profile fields.

returnsUpdateLoginUserDetailsResponse

Response containing the auth request ID (response.authRequestId), which you can use to look up the user’s authentication journey in the auth logs.

const response = await scalekit.auth.updateLoginUserDetails(
'conn_abc123',
'login_xyz789',
{
email: 'john.doe@company.com',
sub: 'unique_user_id_456',
}
);
// The auth request ID can be used to look up the authentication journey via auth logs.
console.log(response.authRequestId);