Skip to content

Commit 0b87294

Browse files
committed
fix: remove useless rejects
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
1 parent 564a29b commit 0b87294

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

backend/src/api/auth/ssoCallback.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ export default async (req, res) => {
2929
jwt.verify(idToken, getKey, { algorithms: ['RS256'] }, (err, decoded) => {
3030
if (err) {
3131
req.log.error('Error verifying token', err)
32-
return reject(new Error401())
32+
reject(new Error401())
3333
}
3434

3535
const { aud } = decoded as any
3636

3737
if (aud !== AUTH0_CONFIG.clientId) {
3838
req.log.error(`Invalid audience: ${aud}`)
39-
return reject(new Error401())
39+
reject(new Error401())
4040
}
4141

42-
return resolve(decoded)
42+
resolve(decoded)
4343
})
4444
})
4545
const data: any = await verifyToken

0 commit comments

Comments
 (0)