firebase-jwt-rs
Firebase JWT decoding utility for Rust.
What is this?
If you have a Rust server and plan to have API for your verifying your firebase users' client token, then it's just for you!
It only contains small utility to decode your client token.
Read more:
Flow
-
In your frontend, you can get your uid by using Firebase Client SDK.
Sample: https://firebase.google.com/docs/auth/admin/verify-id-tokens#retrieve_id_tokens_on_clients
-
Then your frontend can hit the backend Rust API, and send hover the header/POST body (up to you)
-
Backend Rust will verify and send back the JWL claim response (including extracted user's data) back as json
How to use
use *;
use TokenData;
use Error;
let uid = "your-user-uid";
let client_token = "your-client-token";
const result: = verify_token;
match result
License
MIT