@donation-alerts/auth
Version:
Authentication provider for Donation Alerts API with ability to automatically refresh user tokens.
22 lines (21 loc) • 543 B
JavaScript
import { CustomError } from '@donation-alerts/common';
/**
* An error indicating the token is invalid.
*
* This may relate to access tokens, refresh tokens, or other token-related data.
*/
export class InvalidTokenError extends CustomError {
/** @internal */
constructor(_userId, message) {
super(message);
this._userId = _userId;
}
/**
* The ID of the user associated with the token.
*
* Returns `null` if the user is unknown.
*/
get userId() {
return this._userId;
}
}