-
Notifications
You must be signed in to change notification settings - Fork 624
Send the FIS auth token in the RC fetch headers. #1646
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
Conversation
Coverage ReportAffected SDKs
Test Logs
NotesHTML coverage reports can be produced locally with Head commit (8fa5a1df) is created by Prow via merging commits: cbc422e dafda53. |
Binary Size ReportAffected SDKs
Test Logs
NotesHead commit (8fa5a1df) is created by Prow via merging commits: cbc422e dafda53. |
7cacea5
to
a3735b8
Compare
a3735b8
to
4ce3c6a
Compare
4ce3c6a
to
a470ea5
Compare
/test device-check-changed |
1 similar comment
/test device-check-changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! 🚀
@@ -78,6 +78,8 @@ | |||
private static final String X_ANDROID_PACKAGE_HEADER = "X-Android-Package"; | |||
private static final String X_ANDROID_CERT_HEADER = "X-Android-Cert"; | |||
private static final String X_GOOGLE_GFE_CAN_RETRY = "X-Google-GFE-Can-Retry"; | |||
private static final String INSTALLATIONS_AUTH_TOKEN_HEADER = | |||
"X-Goog-Firebase-Installations-Auth"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking (no action required): this is comparable to usage of the same header in RC's iOS SDK: https://github.com/firebase/firebase-ios-sdk/blob/c07c89ee7582e84da1c5aafaa94b38a53bcfbdc2/FirebaseRemoteConfig/Sources/RCNFetch.m#L49
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
assertWithMessage("Fetch() failed with null instance id token!") | ||
assertWithMessage("Fetch() failed with null installation auth token!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking (no action required): this is a public error message, so the phrasing should match the public docs. The FirebaseInstallations.getToken docs describe "authentication token for the Firebase installation", which matches the phrasing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great callout, thank you!
We had a meeting recently with DevRel and Tech Writers and decided to name the authentication tokens for Firebase installations: "installation auth tokens".
So, the action item is probably on us in the FIS team.
@@ -31,6 +31,10 @@ | |||
/** | |||
* Keys of fields in the Fetch request body that the client sends to the Firebase Remote Config | |||
* server. | |||
* | |||
* <p>{@code INSTANCE_ID} and {@code INSTANCE_ID_TOKEN} are legacy names for the fields that used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might need some clarity here. The javadoc gives the impression that INSTANCE_ID_TOKEN can be fetched from FIS SDK, which is incorrect. We can explicitly call out INSTANCE_ID_TOKEN is replaced by installation auth token fetched from FIS SDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Updated.
No description provided.