Skip to content

Commit afb2b76

Browse files
committed
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 } }
1 parent 8e282cc commit afb2b76

File tree

1 file changed

+2
-0
lines changed
  • firebase-dataconnect/src/main/kotlin/com/google/firebase/dataconnect/core

1 file changed

+2
-0
lines changed

firebase-dataconnect/src/main/kotlin/com/google/firebase/dataconnect/core/DataConnectAuth.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ internal class DataConnectAuth(
6363

6464
private companion object {
6565

66+
// The "sub" claim is documented to be "a non-empty string and must be the uid of the user or
67+
// device". See http://goo.gle/4oGjEQt for the relevant Firebase documentation.
6668
fun com.google.firebase.auth.GetTokenResult.getAuthUid(): String? = claims["sub"] as? String
6769
}
6870
}

0 commit comments

Comments
 (0)