/id Client SDK
Modules
Classes
Interfaces
Type Aliases
AnalyticsOptions
Ƭ AnalyticsOptions: Object
Type declaration
Name | Type |
---|---|
options? | SlashIDOptions |
transport? | AnalyticsTransport |
user? | BaseUser |
AnalyticsTransport
Ƭ AnalyticsTransport: Object
Type declaration
Name | Type |
---|---|
sendEvent | (payload : EventPostRequest ) => Promise <void > |
Factor
Ƭ Factor: FactorTypeHelper
<FactorMethodOptionsTypeMap
>[keyof FactorTypeHelper
<FactorMethodOptionsTypeMap
>]
FactorMethod
Ƭ FactorMethod: keyof FactorMethodOptionsTypeMap
PersonHandleType
Ƭ PersonHandleType: typeof PersonHandleType
[keyof typeof PersonHandleType
]
ReachablePersonHandle
Ƭ ReachablePersonHandle: PersonHandle
& { type
: "email_address"
| "phone_number"
}
ReachablePersonHandleType
Ƭ ReachablePersonHandleType: ReachablePersonHandle
["type"
]
WebAuthnAuthenticatorAttachment
Ƭ WebAuthnAuthenticatorAttachment: typeof WebAuthnAuthenticatorAttachment
[keyof typeof WebAuthnAuthenticatorAttachment
]
Variables
Errors
• Const
Errors: Object
Type declaration
Name | Type |
---|---|
InvalidAuthenticationMethodError | { constructor : (method : FactorMethod , message : string ) => InvalidAuthenticationMethodError } |
RateLimitError | { name : string = "RateLimitError"; response : Response ; fromResponseError : (responseError : ResponseError ) => Promise <RateLimitError > } |
SlashIDError | { constructor : (__namedParameters : { cause? : Error ; context? : Record <string , any > ; message : string ; name : string }) => SlashIDError ; context : Record <string , any > & { response? : SerialisedResponseError } ; fromError : <T>(error : T , context? : Record <string , any >) => SlashIDError } |
ERROR_NAMES | { noPasswordSet : string = "noPasswordSet" } |
ERROR_NAMES.noPasswordSet | string |
RESPONSE_HEADERS | { SlashIDCorrelationID : "slashid-correlation-id" = "slashid-correlation-id" } |
RESPONSE_HEADERS.SlashIDCorrelationID | "slashid-correlation-id" |
clientGeneratedErrorSlugs | readonly ["incorrect_otp_code_via_email" , "incorrect_otp_code_via_sms" , "incorrect_otp_code" , "invalid_password" , "incorrect_password" , "recovery_failed" , "passkey_bad_scope" , "passkey_prompt_failed" , "oidc_popup_blocked" , "rate_limit_exceeded" , "timeout" , "client_side_error" , "unspecified" ] |
isClientGeneratedErrorSlug | (text : string ) => text is "incorrect_otp_code_via_email" | "incorrect_otp_code_via_sms" | "incorrect_otp_code" | "invalid_password" | "incorrect_password" | "recovery_failed" | "passkey_bad_scope" | "passkey_prompt_failed" | "oidc_popup_blocked" | "rate_limit_exceeded" | "timeout" | "client_side_error" | "unspecified" |
serialiseResponseError | (error : ResponseError ) => Promise <SerialisedResponseError > |
createEventFromError | (error : unknown , __namedParameters : Omit <FlowErrorMetadata , "failureDetail" >) => Promise <IdFlowFailedEvent | ClientSideErrorEvent > |
ensureError | (value : unknown ) => Error |
getErrorMessage | (error : unknown ) => Promise <string > |
isBadPasskeyScopeError | (error : any ) => Promise <boolean > |
isNetworkError | (error : unknown , response? : Response ) => boolean |
isNoPasswordSetError | (error : ResponseError ) => Promise <boolean > |
isOIDCPopupBlockedError | (error : any ) => Promise <boolean > |
isPasskeyPromptError | (error : any ) => Promise <boolean > |
isRateLimitError | (error : any ) => error is RateLimitError |
isRateLimitInPayload | (response : ApiErrorResponsePayload ) => boolean |
isResponseError | (error : any ) => error is ResponseError |
isSlashIDError | (error : any ) => error is SlashIDError |
isThrownResponse | (response : any ) => response is ApiErrorResponsePayload |
isTimeoutError | (error : any ) => Promise <boolean > |
isTimeoutInPayload | (response : ApiErrorResponsePayload ) => boolean |
toSlashIDError | (value : unknown ) => Promise <SlashIDError > |
PersonHandleType
• Const
PersonHandleType: Object
Export
Type declaration
Name | Type |
---|---|
EmailAddress | "email_address" |
PhoneNumber | "phone_number" |
Username | "username" |
SSR
• Const
SSR: Object
Type declaration
Name | Type |
---|---|
Analytics | typeof BaseAnalytics |
User | typeof BaseUser |
createAnonymousUserToken | (__namedParameters : CreateAnonymousUserOptions ) => Promise <string > |
Utils
• Const
Utils: Object
Type declaration
Name | Type |
---|---|
isReachablePersonHandleType | (handleType : PersonHandleType ) => handleType is "email_address" | "phone_number" |
runtimeSupportsBestPasskeyUX | () => Promise <boolean > |
WebAuthnAuthenticatorAttachment
• Const
WebAuthnAuthenticatorAttachment: Object
Export
Type declaration
Name | Type |
---|---|
Any | "any" |
CrossPlatform | "cross_platform" |
Platform | "platform" |
errors
• Const
errors: Object
Type declaration
Name | Type |
---|---|
InvalidAuthenticationMethodError | { constructor : (method : FactorMethod , message : string ) => InvalidAuthenticationMethodError } |
RateLimitError | { name : string = "RateLimitError"; response : Response ; fromResponseError : (responseError : ResponseError ) => Promise <RateLimitError > } |
SlashIDError | { constructor : (__namedParameters : { cause? : Error ; context? : Record <string , any > ; message : string ; name : string }) => SlashIDError ; context : Record <string , any > & { response? : SerialisedResponseError } ; fromError : <T>(error : T , context? : Record <string , any >) => SlashIDError } |
ERROR_NAMES | { noPasswordSet : string = "noPasswordSet" } |
ERROR_NAMES.noPasswordSet | string |
RESPONSE_HEADERS | { SlashIDCorrelationID : "slashid-correlation-id" = "slashid-correlation-id" } |
RESPONSE_HEADERS.SlashIDCorrelationID | "slashid-correlation-id" |
clientGeneratedErrorSlugs | readonly ["incorrect_otp_code_via_email" , "incorrect_otp_code_via_sms" , "incorrect_otp_code" , "invalid_password" , "incorrect_password" , "recovery_failed" , "passkey_bad_scope" , "passkey_prompt_failed" , "oidc_popup_blocked" , "rate_limit_exceeded" , "timeout" , "client_side_error" , "unspecified" ] |
isClientGeneratedErrorSlug | (text : string ) => text is "incorrect_otp_code_via_email" | "incorrect_otp_code_via_sms" | "incorrect_otp_code" | "invalid_password" | "incorrect_password" | "recovery_failed" | "passkey_bad_scope" | "passkey_prompt_failed" | "oidc_popup_blocked" | "rate_limit_exceeded" | "timeout" | "client_side_error" | "unspecified" |
serialiseResponseError | (error : ResponseError ) => Promise <SerialisedResponseError > |
createEventFromError | (error : unknown , __namedParameters : Omit <FlowErrorMetadata , "failureDetail" >) => Promise <IdFlowFailedEvent | ClientSideErrorEvent > |
ensureError | (value : unknown ) => Error |
getErrorMessage | (error : unknown ) => Promise <string > |
isBadPasskeyScopeError | (error : any ) => Promise <boolean > |
isNetworkError | (error : unknown , response? : Response ) => boolean |
isNoPasswordSetError | (error : ResponseError ) => Promise <boolean > |
isOIDCPopupBlockedError | (error : any ) => Promise <boolean > |
isPasskeyPromptError | (error : any ) => Promise <boolean > |
isRateLimitError | (error : any ) => error is RateLimitError |
isRateLimitInPayload | (response : ApiErrorResponsePayload ) => boolean |
isResponseError | (error : any ) => error is ResponseError |
isSlashIDError | (error : any ) => error is SlashIDError |
isThrownResponse | (response : any ) => response is ApiErrorResponsePayload |
isTimeoutError | (error : any ) => Promise <boolean > |
isTimeoutInPayload | (response : ApiErrorResponsePayload ) => boolean |
toSlashIDError | (value : unknown ) => Promise <SlashIDError > |
version
• Const
version: Object
An object carrying the SlashID SDK version information
Type declaration
Name | Type |
---|---|
major | string |
minor | string |
patch | string |
raw | string |
Functions
__INTERNAL_ONLY
▸ __INTERNAL_ONLY(sid
): Object
Parameters
Name | Type |
---|---|
sid | SlashID |
Returns
Object
Name | Type |
---|---|
publish | <Key>(type : Key , event : PrivateEvents [Key ]) => void |
subscribe | <Key>(type : Key , handler : Handler <PrivateEvents [Key ]>) => void |
unsubscribe | <Key>(type : Key , handler : Handler <PrivateEvents [Key ]>) => void |
createAnonymousUserToken
▸ createAnonymousUserToken(__namedParameters
): Promise
<string
>
Parameters
Name | Type |
---|---|
__namedParameters | CreateAnonymousUserOptions |
Returns
Promise
<string
>