@atproto/oauth-client
Version:
OAuth client for ATPROTO PDS. This package serves as common base for environment-specific implementations (NodeJS, Browser, React-Native).
14 lines • 561 B
JavaScript
export class OAuthCallbackError extends Error {
static from(err, params, state) {
if (err instanceof OAuthCallbackError)
return err;
const message = err instanceof Error ? err.message : undefined;
return new OAuthCallbackError(params, message, state, err);
}
constructor(params, message = params.get('error_description') || 'OAuth callback error', state, cause) {
super(message, { cause });
this.params = params;
this.state = state;
}
}
//# sourceMappingURL=oauth-callback-error.js.map