Open eheading opened 8 years ago
Busy doing research on this at the moment as I'm in the process of setting up FCM and noticed your issue.
From first glance I would say the scope of the second token is not the same as the one that is within the callback.
You could pass in the global scope or try to do your work in the body of the callback?
I can get token by your example as below, but I have no idea how to save the token and let it use outside the function, I have tried many method, e.g. thing to declare global variables, return function value, etc, but it doesn’t work. May I know is there any idea? Many thanks.