Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch Firebase token from passing sender Id #2778

Closed
william-ct opened this issue Jun 30, 2021 · 3 comments
Closed

Fetch Firebase token from passing sender Id #2778

william-ct opened this issue Jun 30, 2021 · 3 comments
Assignees
Labels

Comments

@william-ct
Copy link

What feature would you like to see?

Prior to FirebaseMessaging v22.0.0, we used to use FirebaseInstanceId.getInstance().getToken(senderID, FirebaseMessaging.INSTANCE_ID_SCOPE); to fetch token from passing the sender id. However post v22.0.0 to fetch token we have started using FirebaseMessaging.getInstance().getToken(). Is there any way where we could fetch token by providing the sender id to some public method of getToken() by passing sender id as a parameter?

How would you use it?

We're developing an SDK which enables the clients to add any other secondary project by specifying the sender id using sdk's API's.Before this v22.0.0 change we used to fetch token by FirebaseInstanceId.getInstance().getToken(senderID, FirebaseMessaging.INSTANCE_ID_SCOPE);. Alternatively, post v22.0.0 change we've tried using the FirebaseOptions.Builder() approach, however for this the clients has to specify the project id, application id and api key which is cumbersome and prone to mismatch of credentials most of the time.It'd be great if you guys can let us know if there is any other alternative to fetch tokens from passing sender id apart from FirebaseOptions.Builder() approach.

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@darshanclevertap
Copy link

@ciarand @cpsloal Any updates on this? It has been more than 3 months since this issue was raised.

@gsakakihara
Copy link
Contributor

Creating a new FirebaseApp instance with FirebaseOptions for the project is the current supported way of handling multiple Firebase projects, so there are no plans to support FirebaseMessaging.getToken() using a specified sender ID at this time.

@firebase firebase locked and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants