@donation-alerts/auth
Version:
Authentication provider for Donation Alerts API with ability to automatically refresh user tokens.
26 lines (25 loc) • 703 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidTokenError = void 0;
const common_1 = require("@donation-alerts/common");
/**
* An error indicating the token is invalid.
*
* This may relate to access tokens, refresh tokens, or other token-related data.
*/
class InvalidTokenError extends common_1.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;
}
}
exports.InvalidTokenError = InvalidTokenError;