AuthService
@loginid/websdk3 • Docs
@loginid/websdk3 / Internal Modules / AuthService
Class: AuthService
Constructors
new AuthService()
new AuthService(
httpRequest
):AuthService
Parameters
• httpRequest: BaseHttpRequest
Returns
Properties
httpRequest
readonly
httpRequest:BaseHttpRequest
Methods
authAuthCodeRequest()
authAuthCodeRequest(
__namedParameters
):CancelablePromise
<AuthCode
>
Request OTP code by an authenticated user An authenticated user can request an authentication code directly using this method. The code can be used for authentication from another device.
Parameters
• __namedParameters
• __namedParameters.authorization?: string
JWT Authorization header
Returns
AuthCode OK response.
Throws
ApiError
authAuthCodeRequestEmail()
authAuthCodeRequestEmail(
__namedParameters
):CancelablePromise
<void
>
Request OTP code to be sent via email. Send authentication code to the provided email. The SMS will only be sent if the email address is known to the application, however, this method will return success regardless.
Parameters
• __namedParameters
• __namedParameters.requestBody: AuthCodeRequestSMSRequestBody
Returns
CancelablePromise
<void
>
void
Throws
ApiError
authAuthCodeRequestSms()
authAuthCodeRequestSms(
__namedParameters
):CancelablePromise
<void
>
Request OTP code to be sent via SMS. Send authentication code to the provided phone number. The SMS will only be sent if the phone is registered with the application, however, it will return success regardless.
Parameters
• __namedParameters
• __namedParameters.requestBody: AuthCodeRequestSMSRequestBody
Returns
CancelablePromise
<void
>
void
Throws
ApiError
authAuthCodeVerify()
authAuthCodeVerify(
__namedParameters
):CancelablePromise
<JWT
>
Verify authentication code and return JWT access token with appropriate scopes
Parameters
• __namedParameters
• __namedParameters.requestBody: AuthCodeVerifyRequestBody
Returns
JWT OK response.
Throws
ApiError
authAuthComplete()
authAuthComplete(
__namedParameters
):CancelablePromise
<JWT
>
Complete WebAuthn authentication
Parameters
• __namedParameters
• __namedParameters.requestBody: AuthCompleteRequestBody
Returns
JWT OK response.
Throws
ApiError
authAuthInit()
authAuthInit(
__namedParameters
):CancelablePromise
<AuthInit
>
Start WebAuthn authentication flow
Parameters
• __namedParameters
• __namedParameters.requestBody: AuthInitRequestBody
• __namedParameters.userAgent?: string
Raw user-agent header as set by a browser
Returns
AuthInit OK response.
Throws
ApiError