Skip to content

Instantly share code, notes, and snippets.

@codediodeio
Created August 3, 2018 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codediodeio/72b9ea96d97cedb3582db30b51a291b7 to your computer and use it in GitHub Desktop.
Save codediodeio/72b9ea96d97cedb3582db30b51a291b7 to your computer and use it in GitHub Desktop.
FCM Bug
// BUG: never emits token on first permission granted
this.fcm.getToken.subscribe(console.log);
// Works Fine
this.fcm.requestPermission
.pipe(
switchMap(v => {
return this.fcm.requestToken;
})
)
.subscribe(console.log);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment