I have Key cloak token which is generated after getting logged in UI. I passed this token to backend which is nodeJS. In node I want to get information for this user like user role,user id. Is there any module or pakage for this?
npm install -save jsonwebtoken
var jwt = require('jsonwebtoken');
obj = jwt.decode(token);
The obj contains any information like role, userid, ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With