mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
[next] Cookie Support (#2339)
* feat: added cookie support to coral * feat: adapt client to use cookies * fix: safari input styles * fix: lint * fix: linting * fix: support clearing cookies properly, oauth * feat: support cookies for websocket upgrade requests * fix: lint * fix: tests
This commit is contained in:
@@ -497,6 +497,15 @@ export class InvalidCredentialsError extends CoralError {
|
||||
}
|
||||
}
|
||||
|
||||
export class JWTRevokedError extends CoralError {
|
||||
constructor(jti: string) {
|
||||
super({
|
||||
code: ERROR_CODES.AUTHENTICATION_ERROR,
|
||||
context: { pvt: { jti } },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class AuthenticationError extends CoralError {
|
||||
constructor(reason: string) {
|
||||
super({
|
||||
|
||||
@@ -45,4 +45,5 @@ export const ERROR_TRANSLATIONS: Record<ERROR_CODES, string> = {
|
||||
PASSWORD_RESET_TOKEN_EXPIRED: "error-passwordResetTokenExpired",
|
||||
EMAIL_CONFIRM_TOKEN_EXPIRED: "error-emailConfirmTokenExpired",
|
||||
RATE_LIMIT_EXCEEDED: "error-rateLimitExceeded",
|
||||
JWT_REVOKED: "error-jwtRevoked",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user