Currently, I am utilizing jsonwebtoken
on the server using node to authenticate client requests (specifically with firebase 2.x sdks):
const jwt = require('jsonwebtoken')
jwt.verify(token, <firebase_secret>, (err, decoded) => { })
Up until now, this method has worked flawlessly with requests coming from both browser firebase javascript 2.x and ios firebase 2.x.
However, upon upgrading our ios sdk to firebase 3.x, validation of the token fails with a specific error:
[JsonWebTokenError: jwt malformed] name: 'JsonWebTokenError', message: 'jwt malformed'
.
My objective moving forward is as follows:
- To continue using browser firebase 2.x
- To incorporate ios firebase 3.x
- To still support node firebase 2.x
The question remains - Is there a way to configure the jwt.verify()
function to successfully handle tokens originating from both browser 2.x and ios 3.x?