Skip to main content

SlashID Client SDK

Modules

Classes

Interfaces

Type Aliases

APIResponseError

Ƭ APIResponseError: SlashIDError & { context: { correlationId: string ; response: SerialisedResponseError } ; name: typeof apiResponseError }


AnalyticsOptions

Ƭ AnalyticsOptions: Object

Type declaration

NameType
options?SlashIDOptions
transport?AnalyticsTransport
user?BaseUser

AnalyticsTransport

Ƭ AnalyticsTransport: Object

Type declaration

NameType
sendEvent(payload: EventPostRequest) => Promise<void>

BadPasskeyScopeError

Ƭ BadPasskeyScopeError: SlashIDError & { name: typeof badPasskeyScopeError }


Factor

Ƭ Factor: FactorTypeHelper<FactorMethodOptionsTypeMap>[keyof FactorTypeHelper<FactorMethodOptionsTypeMap>]


FactorMethod

Ƭ FactorMethod: keyof FactorMethodOptionsTypeMap


FlowCancelledError

Ƭ FlowCancelledError: SlashIDError & { context: { challenge: ProxyChallenge } ; name: typeof flowCancelled }


HandlePatternNotAllowedError

Ƭ HandlePatternNotAllowedError: SlashIDError & { name: typeof handlePatternNotAllowed }


InvalidActionError

Ƭ InvalidActionError: SlashIDError & { name: typeof invalidActionError }


InvalidAuthenticationMethodError

Ƭ InvalidAuthenticationMethodError: SlashIDError & { name: typeof invalidAuthenticationMethodError }


InvalidEmailAddressFormatError

Ƭ InvalidEmailAddressFormatError: SlashIDError & { name: typeof invalidEmailAddressFormatError }


InvalidPhoneNumberFormatError

Ƭ InvalidPhoneNumberFormatError: SlashIDError & { name: typeof invalidPhoneNumberFormatError }


InvalidSlashIDConfigurationError

Ƭ InvalidSlashIDConfigurationError: SlashIDError & { name: typeof invalidSlashIDConfigurationError }


InvalidURLParamsError

Ƭ InvalidURLParamsError: SlashIDError & { name: typeof invalidSlashIDURLParamsError }


NoPasswordSetError

Ƭ NoPasswordSetError: SlashIDError & { name: typeof noPasswordSet }


NonReachableHandleTypeError

Ƭ NonReachableHandleTypeError: SlashIDError & { name: typeof recoverNonReachableHandleType }


PasskeyPromptError

Ƭ PasskeyPromptError: SlashIDError & { name: typeof passkeyPromptError }


PersonExistsError

Ƭ PersonExistsError: SlashIDError & { name: typeof personExistsError }


PersonHandleType

Ƭ PersonHandleType: typeof PersonHandleType[keyof typeof PersonHandleType]


RateLimitError

Ƭ RateLimitError: SlashIDError & { name: typeof rateLimitError }


ReachablePersonHandle

Ƭ ReachablePersonHandle: PersonHandle & { type: "email_address" | "phone_number" }


ReachablePersonHandleType

Ƭ ReachablePersonHandleType: ReachablePersonHandle["type"]


SelfRegistrationNotAllowedError

Ƭ SelfRegistrationNotAllowedError: SlashIDError & { name: typeof selfRegistrationNotAllowed }


SignInAwaitingApprovalError

Ƭ SignInAwaitingApprovalError: SlashIDError & { name: typeof signInAwaitingApproval }


SignUpAwaitingApprovalError

Ƭ SignUpAwaitingApprovalError: SlashIDError & { name: typeof signUpAwaitingApproval }


SlashIDError

Ƭ SlashIDError: FlowCancelledError | SelfRegistrationNotAllowedError | NoPasswordSetError | NonReachableHandleTypeError | HandlePatternNotAllowedError | SignUpAwaitingApprovalError | SignInAwaitingApprovalError | TimeoutError | RateLimitError | BadPasskeyScopeError | InvalidSlashIDConfigurationError | InvalidURLParamsError | InvalidAuthenticationMethodError | PasskeyPromptError | InvalidActionError | PersonExistsError | InvalidEmailAddressFormatError | InvalidPhoneNumberFormatError | APIResponseError | UnexpectedError


TimeoutError

Ƭ TimeoutError: SlashIDError & { name: typeof timeoutError }


UnexpectedError

Ƭ UnexpectedError: SlashIDError & { name: typeof unknown }


UserToken

Ƭ UserToken: UserToken & Partial<JsonObject>


WebAuthnAuthenticatorAttachment

Ƭ WebAuthnAuthenticatorAttachment: typeof WebAuthnAuthenticatorAttachment[keyof typeof WebAuthnAuthenticatorAttachment]

Variables

Errors

Const Errors: Object

Type declaration

NameType
CLIENT_GENERATED_ERROR_SLUGS{}
ERROR_NAMES_TO_SLUGS_MAP{}
ERROR_NAMES{ apiResponseError: "APIResponseError" = "APIResponseError"; badPasskeyScopeError: "BadPasskeyScopeError" = "BadPasskeyScopeError"; flowCancelled: "FlowCancelledError" = "FlowCancelledError"; handlePatternNotAllowed: "HandlePatternNotAllowedError" = "HandlePatternNotAllowedError"; invalidActionError: "InvalidActionError" = "InvalidActionError"; invalidAuthenticationMethodError: "InvalidAuthenticationMethodError" = "InvalidAuthenticationMethodError"; invalidEmailAddressFormatError: "InvalidEmailAddressFormatError" = "InvalidEmailAddressFormatError"; invalidPhoneNumberFormatError: "InvalidPhoneNumberFormatError" = "InvalidPhoneNumberFormatError"; invalidSlashIDConfigurationError: "InvalidSlashIDConfigurationError" = "InvalidSlashIDConfigurationError"; invalidSlashIDURLParamsError: "InvalidSlashIDURLParamsError" = "InvalidSlashIDURLParamsError"; noPasswordSet: "noPasswordSet" = "noPasswordSet"; passkeyPromptError: "PasskeyPromptError" = "PasskeyPromptError"; personExistsError: "PersonExistsError" = "PersonExistsError"; rateLimitError: "RateLimitError" = "RateLimitError"; recoverNonReachableHandleType: "recoverNonReachableHandleType" = "recoverNonReachableHandleType"; selfRegistrationNotAllowed: "SelfRegistrationNotAllowed" = "SelfRegistrationNotAllowed"; signInAwaitingApproval: "SignInAwaitingApprovalError" = "SignInAwaitingApprovalError"; signUpAwaitingApproval: "SignUpAwaitingApprovalError" = "SignUpAwaitingApprovalError"; timeoutError: "TimeoutError" = "TimeoutError"; unknown: "UnexpectedError" = "UnexpectedError" }
ERROR_NAMES.apiResponseError"APIResponseError"
ERROR_NAMES.badPasskeyScopeError"BadPasskeyScopeError"
ERROR_NAMES.flowCancelled"FlowCancelledError"
ERROR_NAMES.handlePatternNotAllowed"HandlePatternNotAllowedError"
ERROR_NAMES.invalidActionError"InvalidActionError"
ERROR_NAMES.invalidAuthenticationMethodError"InvalidAuthenticationMethodError"
ERROR_NAMES.invalidEmailAddressFormatError"InvalidEmailAddressFormatError"
ERROR_NAMES.invalidPhoneNumberFormatError"InvalidPhoneNumberFormatError"
ERROR_NAMES.invalidSlashIDConfigurationError"InvalidSlashIDConfigurationError"
ERROR_NAMES.invalidSlashIDURLParamsError"InvalidSlashIDURLParamsError"
ERROR_NAMES.noPasswordSet"noPasswordSet"
ERROR_NAMES.passkeyPromptError"PasskeyPromptError"
ERROR_NAMES.personExistsError"PersonExistsError"
ERROR_NAMES.rateLimitError"RateLimitError"
ERROR_NAMES.recoverNonReachableHandleType"recoverNonReachableHandleType"
ERROR_NAMES.selfRegistrationNotAllowed"SelfRegistrationNotAllowed"
ERROR_NAMES.signInAwaitingApproval"SignInAwaitingApprovalError"
ERROR_NAMES.signUpAwaitingApproval"SignUpAwaitingApprovalError"
ERROR_NAMES.timeoutError"TimeoutError"
ERROR_NAMES.unknown"UnexpectedError"
isClientGeneratedErrorSlug(text: string) => text is "incorrect_otp_code_via_email" | "incorrect_otp_code_via_sms" | "incorrect_otp_code" | "invalid_password" | "incorrect_password" | "recovery_failed" | "oidc_popup_blocked" | "client_side_error" | "unspecified" | "no_password_set" | "flow_cancelled" | "handle_pattern_not_allowed" | "sign_up_awaiting_approval" | "sign_in_awaiting_approval" | "self_registration_not_allowed" | "recover_non_reachable_handle_type" | "timeout" | "rate_limit_exceeded" | "passkey_bad_scope" | "passkey_prompt_failed" | "api_response_error" | "invalid_slashid_configuration" | "invalid_slashid_url_params" | "invalid_authentication_method" | "invalid_action" | "invalid_email_address_format" | "invalid_phone_number_format" | "person_exists"
createSlashIDError(__namedParameters: SlashIDErrorInput) => SlashIDError
isAPIResponseError(error: any) => error is APIResponseError
isBadPasskeyScopeError(error: any) => error is BadPasskeyScopeError
isFlowCancelledError(error: any) => error is FlowCancelledError
isHandlePatternNotAllowedError(error: any) => error is HandlePatternNotAllowedError
isInvalidActionError(error: any) => error is InvalidActionError
isInvalidAuthenticationMethodError(error: any) => error is InvalidAuthenticationMethodError
isInvalidEmailAddressFormatError(error: any) => error is InvalidEmailAddressFormatError
isInvalidPhoneNumberFormatError(error: any) => error is InvalidPhoneNumberFormatError
isInvalidSlashIDConfigurationError(error: any) => error is InvalidSlashIDConfigurationError
isInvalidURLParamsError(error: any) => error is InvalidURLParamsError
isNoPasswordSetError(error: SlashIDError) => error is NoPasswordSetError
isNonReachableHandleTypeError(error: Error) => error is NonReachableHandleTypeError
isPasskeyPromptError(error: any) => error is PasskeyPromptError
isPersonExistsError(error: any) => error is PersonExistsError
isRateLimitError(error: any) => error is RateLimitError
isSelfRegistrationNotAllowedError(error: SlashIDError) => error is SelfRegistrationNotAllowedError
isSignInAwaitingApprovalError(error: any) => error is SignInAwaitingApprovalError
isSignUpAwaitingApprovalError(error: any) => error is SignUpAwaitingApprovalError
isSlashIDError(error: any) => error is SlashIDError
isTimeoutError(error: any) => error is TimeoutError
isUnexpectedError(error: any) => error is UnexpectedError

PersonHandleType

Const PersonHandleType: Object

Export

Type declaration

NameType
EmailAddress"email_address"
PhoneNumber"phone_number"
Username"username"

SSR

Const SSR: Object

Type declaration

NameType
Analyticstypeof BaseAnalytics
ChallengeProcessortypeof ChallengeProcessor
Usertypeof BaseUser
createAnonymousUserToken(__namedParameters: CreateAnonymousUserOptions) => Promise<string>

Utils

Const Utils: Object

Type declaration

NameType
isReachablePersonHandleType(handleType: PersonHandleType) => handleType is "email_address" | "phone_number"
runtimeSupportsBestPasskeyUX() => Promise<boolean>

WebAuthnAuthenticatorAttachment

Const WebAuthnAuthenticatorAttachment: Object

Export

Type declaration

NameType
Any"any"
CrossPlatform"cross_platform"
Platform"platform"

errors

Const errors: Object

Type declaration

NameType
ERROR_NAMES{ apiResponseError: "APIResponseError" = "APIResponseError"; badPasskeyScopeError: "BadPasskeyScopeError" = "BadPasskeyScopeError"; flowCancelled: "FlowCancelledError" = "FlowCancelledError"; handlePatternNotAllowed: "HandlePatternNotAllowedError" = "HandlePatternNotAllowedError"; invalidActionError: "InvalidActionError" = "InvalidActionError"; invalidAuthenticationMethodError: "InvalidAuthenticationMethodError" = "InvalidAuthenticationMethodError"; invalidEmailAddressFormatError: "InvalidEmailAddressFormatError" = "InvalidEmailAddressFormatError"; invalidPhoneNumberFormatError: "InvalidPhoneNumberFormatError" = "InvalidPhoneNumberFormatError"; invalidSlashIDConfigurationError: "InvalidSlashIDConfigurationError" = "InvalidSlashIDConfigurationError"; invalidSlashIDURLParamsError: "InvalidSlashIDURLParamsError" = "InvalidSlashIDURLParamsError"; noPasswordSet: "noPasswordSet" = "noPasswordSet"; passkeyPromptError: "PasskeyPromptError" = "PasskeyPromptError"; personExistsError: "PersonExistsError" = "PersonExistsError"; rateLimitError: "RateLimitError" = "RateLimitError"; recoverNonReachableHandleType: "recoverNonReachableHandleType" = "recoverNonReachableHandleType"; selfRegistrationNotAllowed: "SelfRegistrationNotAllowed" = "SelfRegistrationNotAllowed"; signInAwaitingApproval: "SignInAwaitingApprovalError" = "SignInAwaitingApprovalError"; signUpAwaitingApproval: "SignUpAwaitingApprovalError" = "SignUpAwaitingApprovalError"; timeoutError: "TimeoutError" = "TimeoutError"; unknown: "UnexpectedError" = "UnexpectedError" }
ERROR_NAMES.apiResponseError"APIResponseError"
ERROR_NAMES.badPasskeyScopeError"BadPasskeyScopeError"
ERROR_NAMES.flowCancelled"FlowCancelledError"
ERROR_NAMES.handlePatternNotAllowed"HandlePatternNotAllowedError"
ERROR_NAMES.invalidActionError"InvalidActionError"
ERROR_NAMES.invalidAuthenticationMethodError"InvalidAuthenticationMethodError"
ERROR_NAMES.invalidEmailAddressFormatError"InvalidEmailAddressFormatError"
ERROR_NAMES.invalidPhoneNumberFormatError"InvalidPhoneNumberFormatError"
ERROR_NAMES.invalidSlashIDConfigurationError"InvalidSlashIDConfigurationError"
ERROR_NAMES.invalidSlashIDURLParamsError"InvalidSlashIDURLParamsError"
ERROR_NAMES.noPasswordSet"noPasswordSet"
ERROR_NAMES.passkeyPromptError"PasskeyPromptError"
ERROR_NAMES.personExistsError"PersonExistsError"
ERROR_NAMES.rateLimitError"RateLimitError"
ERROR_NAMES.recoverNonReachableHandleType"recoverNonReachableHandleType"
ERROR_NAMES.selfRegistrationNotAllowed"SelfRegistrationNotAllowed"
ERROR_NAMES.signInAwaitingApproval"SignInAwaitingApprovalError"
ERROR_NAMES.signUpAwaitingApproval"SignUpAwaitingApprovalError"
ERROR_NAMES.timeoutError"TimeoutError"
ERROR_NAMES.unknown"UnexpectedError"
isClientGeneratedErrorSlug(text: string) => text is "incorrect_otp_code_via_email" | "incorrect_otp_code_via_sms" | "incorrect_otp_code" | "invalid_password" | "incorrect_password" | "recovery_failed" | "oidc_popup_blocked" | "client_side_error" | "unspecified" | "no_password_set" | "flow_cancelled" | "handle_pattern_not_allowed" | "sign_up_awaiting_approval" | "sign_in_awaiting_approval" | "self_registration_not_allowed" | "recover_non_reachable_handle_type" | "timeout" | "rate_limit_exceeded" | "passkey_bad_scope" | "passkey_prompt_failed" | "api_response_error" | "invalid_slashid_configuration" | "invalid_slashid_url_params" | "invalid_authentication_method" | "invalid_action" | "invalid_email_address_format" | "invalid_phone_number_format" | "person_exists"
CLIENT_GENERATED_ERROR_SLUGSreadonly ["incorrect_otp_code_via_email", "incorrect_otp_code_via_sms", "incorrect_otp_code", "invalid_password", "incorrect_password", "recovery_failed", "oidc_popup_blocked", "client_side_error", "unspecified", "no_password_set", "flow_cancelled", "handle_pattern_not_allowed", "sign_up_awaiting_approval", "sign_in_awaiting_approval", "self_registration_not_allowed", "recover_non_reachable_handle_type", "timeout", "rate_limit_exceeded", "passkey_bad_scope", "passkey_prompt_failed", "api_response_error", "invalid_slashid_configuration", "invalid_slashid_url_params", "invalid_authentication_method", "invalid_action", "invalid_email_address_format", "invalid_phone_number_format", "person_exists"]
ERROR_NAMES_TO_SLUGS_MAPRecord<ErrorName, ClientGeneratedErrorSlug>
createSlashIDError(__namedParameters: SlashIDErrorInput) => SlashIDError
isAPIResponseError(error: any) => error is APIResponseError
isBadPasskeyScopeError(error: any) => error is BadPasskeyScopeError
isFlowCancelledError(error: any) => error is FlowCancelledError
isHandlePatternNotAllowedError(error: any) => error is HandlePatternNotAllowedError
isInvalidActionError(error: any) => error is InvalidActionError
isInvalidAuthenticationMethodError(error: any) => error is InvalidAuthenticationMethodError
isInvalidEmailAddressFormatError(error: any) => error is InvalidEmailAddressFormatError
isInvalidPhoneNumberFormatError(error: any) => error is InvalidPhoneNumberFormatError
isInvalidSlashIDConfigurationError(error: any) => error is InvalidSlashIDConfigurationError
isInvalidURLParamsError(error: any) => error is InvalidURLParamsError
isNoPasswordSetError(error: SlashIDError) => error is NoPasswordSetError
isNonReachableHandleTypeError(error: Error) => error is NonReachableHandleTypeError
isPasskeyPromptError(error: any) => error is PasskeyPromptError
isPersonExistsError(error: any) => error is PersonExistsError
isRateLimitError(error: any) => error is RateLimitError
isSelfRegistrationNotAllowedError(error: SlashIDError) => error is SelfRegistrationNotAllowedError
isSignInAwaitingApprovalError(error: any) => error is SignInAwaitingApprovalError
isSignUpAwaitingApprovalError(error: any) => error is SignUpAwaitingApprovalError
isSlashIDError(error: any) => error is SlashIDError
isTimeoutError(error: any) => error is TimeoutError
isUnexpectedError(error: any) => error is UnexpectedError

version

Const version: Object

An object carrying the SlashID SDK version information

Type declaration

NameType
majorstring
minorstring
patchstring
rawstring

Functions

__INTERNAL_ONLY

__INTERNAL_ONLY(sid): Object

Parameters

NameType
sidSlashID

Returns

Object

NameType
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

NameType
__namedParametersCreateAnonymousUserOptions

Returns

Promise<string>