Open Alemasoft opened 1 month ago
This is the output from jwt.io. The sign_in_provider field is present. It seems that the constructor wrongfully get the sign_in_provider from the main map instead of the firebase inner field.
firebase: TokenProvider(
identities: Map.from(map['firebase']! as Map),
signInProvider: map['sign_in_provider']! as String, <<< THIS IS NULL
signInSecondFactor: map['sign_in_second_factor'] as String?,
secondFactorIdentifier: map['second_factor_identifier'] as String?,
tenant: map['tenant'] as String?,
),
firebase: TokenProvider(
identities: Map.from(map['firebase']! as Map),
signInProvider: Map.from(map['firebase']! as Map)['sign_in_provider']! as String, <<< THIS SHOULD BE NOT NULL
signInSecondFactor: map['sign_in_second_factor'] as String?,
secondFactorIdentifier: map['second_factor_identifier'] as String?,
tenant: map['tenant'] as String?,
),
Seeing the same bug - for a token thats valid using the python admin sdk.
Describe the bug Trying to verify a firebase auth token generated with mail and password from a flutter app throws a Null check error when decoding it.
The error comes from: package:dart_firebase_admin/src/auth/token_verifier.dart:318:48
To Reproduce
In the flutter App
In the serverpod endpoint
Expected behavior The token should be valid since is not custom generated and furthermore is taken fromthe official firebase_auth package.