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

Improved FCM Support Supporting both Legacy and OAuth2 Methods #353

Merged
merged 4 commits into from
Feb 14, 2021

Conversation

caronc
Copy link
Owner

@caronc caronc commented Feb 4, 2021

Description:

Related issue (if applicable): #326

This is an almost completely rewrite of the FCM plugin.

Now the legacy URLs work providing the Web API Token from the project page. However i've also researched how the json file works and support this too (without all of the overhead of the Google libraries). So the syntax is as follows:

Legacy Mode:

  • fcm://apikey/target

OAuth2 Mode:
You can point to the JSON file generated from the Project page either by path or by web URL (if you're sharing it somewhere on your network) like so:

  • fcm://project_id/target?keyfile=/path/to/keyfile
  • fcm://project_id/target/target2/targetN/?keyfile=https://user:pass@localhost/web/location

Here is a better overview of what needs to be done to use the new version of this service:

Firebase

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

@caronc
Copy link
Owner Author

caronc commented Feb 4, 2021

@nobruramos Would you mind giving this a try as you were kind enough to help me test the FCM out before.

I've almost completely re-wrote the entire thing now to properly support the Web API Key in addition to the new OAuth2 mode. I still need to add more test coverage before I push this into the main branch though.

@nobruramos
Copy link

nobruramos commented Feb 4, 2021 via email

@caronc caronc changed the title 326 better fcm support Improved FCM Support Supporting both Legacy and OAuth2 Methods Feb 4, 2021
@caronc caronc merged commit 4a2f60e into master Feb 14, 2021
@caronc caronc deleted the 326-better-fcm-support branch February 14, 2021 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants