Updated membership logic for SAML auth

This commit is contained in:
Tuan Dang
2023-07-31 17:36:42 +07:00
parent 59ebe0c22e
commit b78150e78d
4 changed files with 43 additions and 14 deletions
+1 -2
View File
@@ -106,7 +106,6 @@ export const login1 = async (req: Request, res: Response) => {
*/
export const login2 = async (req: Request, res: Response) => {
try {
if (!req.headers["user-agent"]) throw InternalServerError({ message: "User-Agent header is required" });
const { email, clientProof, providerAuthToken } = req.body;
@@ -189,7 +188,7 @@ export const login2 = async (req: Request, res: Response) => {
ip: req.realIP,
userAgent: req.headers["user-agent"] ?? "",
});
// store (refresh) token in httpOnly cookie
res.cookie("jid", tokens.refreshToken, {
httpOnly: true,