From f56fe05622b616786d3285c7afc5d86a090eca61 Mon Sep 17 00:00:00 2001 From: Manuel Kasper Date: Thu, 28 Dec 2023 17:31:37 +0100 Subject: [PATCH] Fix jwt --- photos_router.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/photos_router.js b/photos_router.js index d7d927e..a67f3ed 100644 --- a/photos_router.js +++ b/photos_router.js @@ -2,7 +2,7 @@ const express = require('express') const multer = require('multer') const config = require('./config') const photos = require('./photos') -const jwt = require('express-jwt') +var { expressjwt: jwt } = require("express-jwt") const jwksRsa = require('jwks-rsa') const db = require('./db') @@ -17,7 +17,8 @@ let jwtCallback = jwt({ rateLimit: true, jwksRequestsPerMinute: 5, jwksUri: config.sso.jwksUri - }) + }), + algorithms: ['RS256'] }) router.post('/summits/:association/:code/upload', jwtCallback, upload.array('photo'), async (req, res) => {