remove email from decoding

This commit is contained in:
Moriz Wahl 2021-09-13 13:39:55 +02:00
parent 12a5f58376
commit 4f4cdb6fe5

View File

@ -7,15 +7,12 @@ import CONFIG from '../config/'
export default (token: string): any => {
if (!token) return null
let sessionId = null
const email = null
try {
const decoded = jwt.verify(token, CONFIG.JWT_SECRET)
sessionId = decoded.sub
// email = decoded.email
return {
token,
sessionId,
email,
}
} catch (err) {
return null