Skip to content

Commit 5605992

Browse files
Add small adjustemnt
1 parent 3e8055f commit 5605992

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

playground/familytour-proxy/.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ node_modules
22
users*.csv
33
.env
44
.venv
5-
dist
5+
dist
6+
7+
# Mail Merge letter and data (Confidential User Data)
8+
*.docx
9+
*.xlsx

playground/familytour-proxy/auth-proxy/src/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ app.get('/api/v1/auths/signout', async (req: Request, res: Response) => {
119119
});
120120

121121
app.get('/login', async (req: Request, res: Response) => {
122-
if (await isAuthenticated(req, res)) return res.redirect('/');
122+
const session = await getIronSession<SessionData>(req, res, sessionOptions);
123+
if (await isAuthenticated(req, res)) session.destroy();
123124
// If ?token=... is provided, use JWT auth
124125
const token = req.query.token;
125126
if (token && typeof token === 'string') {

0 commit comments

Comments
 (0)