Skip to content

Access to tokenManager class #117

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

Closed
jcao02 opened this issue Jul 29, 2017 · 2 comments
Closed

Access to tokenManager class #117

jcao02 opened this issue Jul 29, 2017 · 2 comments
Assignees

Comments

@jcao02
Copy link

jcao02 commented Jul 29, 2017

[REQUIRED] Describe your environment

  • Operating System version: ubuntu 14.04
  • Firebase SDK version: 4.1.3
  • Firebase Product: messaging

[REQUIRED] Describe the problem

I want to implement a service to manage the token using your sdk. For that, I want to be able to check if there's a token stored locally, unfortunately you only provide getToken which doesn't tell whether it got the token from FCM or from the local DB.

Searching inside your code, I noticed you have a token manager class which is private. Perhaps you could make it public or at least a couple of its methods.

Steps to reproduce:

Just check the interfaces

Relevant Code:

I'd like to be able to do something like this:

const token = messaging.getSavedToken();
if (!!token) { /* Do something */ }

// OR

const hasToken = messaging.hasSavedToken();
if (hasToken) { /* Do something */ }
@gauntface
Copy link

What is the use case for getSavedToken() ?

@jshcrowthe
Copy link
Contributor

Closing due to inactivity, feel free to re-open if this is something that you still want to pursue.

Feiyang1 pushed a commit that referenced this issue Apr 30, 2019
@firebase firebase locked and limited conversation to collaborators Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants