Marplex / flarebase-auth

Firebase/Admin Auth Javascript Library for Cloudflare Workers
https://dev.to/marplex/firebase-authentication-on-cloudflare-workers-24o3
MIT License
88 stars 14 forks source link

Question on uid after verifySessionCookie #6

Closed santoshv98 closed 4 months ago

santoshv98 commented 7 months ago

How do I find out uid after performing a verifySessionCookie? The sdk verifySessionCookie returns an object thats different from your DecodedIDToken, so I am not able to understand how I can get uid (firebase's identifier for the user)?

verifySessionCookie - is it verifying offline just by decoding jwt and NOT making any real requests to FB Http API. Can you pl confirm?

clibequilibrium commented 6 months ago
  • **I'm submitting a . question about how to use this project
  • Summary

How do I find out uid after performing a verifySessionCookie? The sdk verifySessionCookie returns an object thats different from your DecodedIDToken, so I am not able to understand how I can get uid (firebase's identifier for the user)?

verifySessionCookie - is it verifying offline just by decoding jwt and NOT making any real requests to FB Http API. Can you pl confirm?

It's token.sub as stated in https://jwt.io/introduction

As for verficitaion, read the code there is no checkRevoked code path.