You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DataConnectAuth.kt: add a link to the docs to justify using the "sub" claim.
The unshortened URL is: https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_a_third-party_jwt_library
Here is what the page looked like when viewed on Oct 24, 2025:
https://github.com/user-attachments/assets/65f9d0ec-9067-40a7-a2d6-ce91e69d1dc4
diff --git a/firebase-dataconnect/src/main/kotlin/com/google/firebase/dataconnect/core/DataConnectAuth.kt b/firebase-dataconnect/src/main/kotlin/com/google/firebase/dataconnect/core/DataConnectAuth.kt
index e984150..55bb959 100644
--- a/firebase-dataconnect/src/main/kotlin/com/google/firebase/dataconnect/core/DataConnectAuth.kt
+++ b/firebase-dataconnect/src/main/kotlin/com/google/firebase/dataconnect/core/DataConnectAuth.kt
@@ -63,6 +63,8 @@ internal class DataConnectAuth(
private companion object {
+ // The "sub" claim is documented to be "a non-empty string and must be the uid of the user or
+ // device". See http://goo.gle/4oGjEQt for the relevant Firebase documentation.
fun com.google.firebase.auth.GetTokenResult.getAuthUid(): String? = claims["sub"] as? String
}
}
0 commit comments