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

Firebase Installations: throw exception on missing FIROptions.projectID or invalid API Key #4692

Closed
maksymmalyhin opened this issue Jan 16, 2020 · 2 comments · Fixed by #6678

Comments

@maksymmalyhin
Copy link
Contributor

maksymmalyhin commented Jan 16, 2020

Background:

  • FIROptions.projectID is needed for Firebase Installations SDK(FIS SDK) to be sent with API requests
  • FIS SDK is a dependency for Firebase Instance ID SDK (IID SDK) (starting from IID SDK 4.3.0)
  • IID SDK does not require FIROptions.projectID. It means that introducing a new dependency enforcing projectID to IID SDK technically is a breaking change and should not be introduced until a major release.

Workaround:
FIS SDK uses FIROptions. GCMSenderID in case if FIROptions.projectID is missing to avoid breaking changes. (see #4683)

To be done:

  • Update FIS SDK to enforce FIROptions.projectID for the next major release (Firebase 7)
  • Enforce API Key format to filter non-Firebase API keys accident use (b/147712985)
@ryanwilson
Copy link
Member

Is there a downside to using the GCMSenderID on the server side? Just wondering if it's necessary to break eventually if GCMSenderID has no downsides.

@maksymmalyhin
Copy link
Contributor Author

I think @andirayo can provide the best answer here. As far as I know using GCMSenderID for this purpose is a bit of a hack and is fine to use just until we can do breaking changes. Also GCMSenderID is considered to be deprecated, so we should promote using it.

@maksymmalyhin maksymmalyhin changed the title Firebase Installations: throw exception on missing FIROptions.projectID Firebase Installations: throw exception on missing FIROptions.projectID or invalid API Key Sep 15, 2020
@firebase firebase locked and limited conversation to collaborators Nov 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants