🐛 fix: access cookie via header on logout
Some checks failed
Integration Tests / integration-tests (pull_request) Failing after 51s

This commit is contained in:
2026-02-15 22:58:24 +07:00
parent 42aa7ed8d3
commit c74597c57d
5 changed files with 15 additions and 11 deletions

View File

@ -1,11 +1,12 @@
import { AppError } from "../../../../helpers/error/instances/app";
import { ErrorForwarder } from "../../../../helpers/error/instances/forwarder";
import { jwtDecode } from "../../../../helpers/http/jwt/decode";
export const tokenValidationService = (payload: string) => {
try {
if (!payload) return null;
const decoded = jwtDecode(payload);
return decoded;
} catch (error) {
throw new AppError(500, "Token validation failed", error);
ErrorForwarder(error);
}
};