diff --git a/Sources/FirebaseJWTMiddleware/FirebaseJWTPayload.swift b/Sources/FirebaseJWTMiddleware/FirebaseJWTPayload.swift index 3a96969..d536fc3 100644 --- a/Sources/FirebaseJWTMiddleware/FirebaseJWTPayload.swift +++ b/Sources/FirebaseJWTMiddleware/FirebaseJWTPayload.swift @@ -21,6 +21,7 @@ public struct FirebaseJWTPayload: JWTPayload { case authTime = "auth_time" case isEmailVerified = "email_verified" case phoneNumber = "phone_number" + case firebase = "firebase" } /// Issuer. It must be "https://securetoken.google.com/", where is the same project ID used for aud @@ -47,6 +48,7 @@ public struct FirebaseJWTPayload: JWTPayload { public let name: String? public let isEmailVerified: Bool? public let phoneNumber: String? + public let firebase: Firebase? public func verify(using signer: JWTSigner) throws { guard self.issuer.value.contains("securetoken.google.com") else { @@ -60,3 +62,9 @@ public struct FirebaseJWTPayload: JWTPayload { try self.expirationAt.verifyNotExpired() } } + +public struct Firebase: Codable { + public let identities: [String: [String]] + public let sign_in_provider: String +} +