Skip to content

Commit f454372

Browse files
committed
chore: update-netlify-functions-to-test-notifications
1 parent 7172065 commit f454372

File tree

3 files changed

+4
-171
lines changed

3 files changed

+4
-171
lines changed

web/netlify/functions/authUser.ts

Lines changed: 0 additions & 117 deletions
This file was deleted.

web/netlify/functions/getNonce.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

web/netlify/middleware/authMiddleware.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ export const authMiddleware = () => {
1414
}
1515

1616
try {
17-
const issuer = process.env.JWT_ISSUER ?? "Kleros"; // ex :- Kleros
18-
const audience = process.env.JWT_AUDIENCE ?? "Court"; // ex :- Court, Curate, Escrow
19-
const secret = process.env.JWT_SECRET;
17+
// const secret = process.env.JWT_SECRET;
18+
// TODO testing purpose
19+
const secret = "u03tzA7Un9w+fetret343t6U2YaOlINle1E4avjc=";
2020

2121
if (!secret) {
2222
throw new Error("Secret not set in environment");
2323
}
2424

2525
const encodedSecret = new TextEncoder().encode(secret);
2626

27-
const { payload } = await jwt.jwtVerify(authToken, encodedSecret, { issuer, audience });
27+
const { payload } = await jwt.jwtVerify(authToken, encodedSecret);
2828

2929
// add auth details to event
3030
request.event.auth = payload;

0 commit comments

Comments
 (0)