This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:dio/dio.dart'; // default `http` package can be used as well | |
import 'package:jose/jose.dart'; // BSD-3-Clause, use `dart_jsonwebtoken` package in case of MIT license | |
const firebaseProjectId = "FIREBASE_PROJECT_ID"; | |
Map<String, String> googleSecureTokens = {}; // { "KeyId": "PublicKey" } from public Google website | |
DateTime? googleTokensExpirationDate; | |
// Verify Firebase JWT token | |
// https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_a_third-party_jwt_library | |
Future<bool> validateToken(String token) async { |