firebase/functions-samples

[DOCS] cloud_functions onCall : How can I get idToken ?

Patrick386 opened this issue · 0 comments

Is there no user id token in context ?

How can I get idToken ?

Client: ex
String token = await user.getIdToken();

Server

The context automagically contains metadata about the request such as uid and token.

exports.getConfiguration = functions
.runWith({enforceAppCheck: true})
.https.onCall(async(data, context) => {

 const token = context.IdToken ???
.....
}