Skip to content

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

Open
@Patrick386

Description

@Patrick386

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 ???
.....
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions