Skip to content

Commit

Permalink
Merge pull request #36 from solun-pm/dev
Browse files Browse the repository at this point in the history
Bug with authentication
  • Loading branch information
DanielWTE authored Apr 8, 2024
2 parents 719a131 + a646984 commit 285308b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solun-api",
"version": "1.2.19",
"version": "1.2.20",
"description": "Exists only to handle any requests from the Solun applications.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ app.use(morganMiddleware);
async function auth(req: any, res:any, next: any) {
const token = req.body.token;
if(token) {
jwt.verify(token, process.env.JWT_SECRET as string, (err: any, decoded: any) => {
jwt.verify(token, process.env.JWT_SECRET_KEY as string, (err: any, decoded: any) => {
if(err) {
res.status(403).json({ error: 'Request got rejected, this ressource is protected.' });
} else {
Expand Down

0 comments on commit 285308b

Please sign in to comment.