@auth0/auth0-spa-js
Version:
Auth0 SDK for Single Page Applications using Authorization Code Grant Flow with PKCE
26 lines (21 loc) • 584 B
text/typescript
export {
PasskeyRegisterError,
PasskeyChallengeError,
PasskeyGetTokenError
} from '@auth0/auth0-auth-js';
export interface PasskeyErrorResponse {
error: string;
error_description: string;
message?: string;
}
export class PasskeyError extends Error {
public readonly code: string;
public readonly cause?: PasskeyErrorResponse;
constructor(code: string, message: string, cause?: PasskeyErrorResponse) {
super(message);
this.name = 'PasskeyError';
this.code = code;
this.cause = cause;
Object.setPrototypeOf(this, PasskeyError.prototype);
}
}