public async Task VerifyIdTokenNoProjectId()
        {
            FirebaseApp.Create(new AppOptions()
            {
                Credential = MockCredential
            });
            var idToken = await IdTokenVerificationTest.CreateTestTokenAsync();

            await Assert.ThrowsAsync <ArgumentException>(
                async() => await FirebaseAuth.DefaultInstance.VerifyIdTokenAsync(idToken));
        }
        public async Task VerifyIdTokenCancel()
        {
            FirebaseApp.Create(new AppOptions()
            {
                Credential = MockCredential,
                ProjectId  = "test-project",
            });
            var canceller = new CancellationTokenSource();

            canceller.Cancel();
            var idToken = await IdTokenVerificationTest.CreateTestTokenAsync();

            await Assert.ThrowsAnyAsync <OperationCanceledException>(
                async() => await FirebaseAuth.DefaultInstance.VerifyIdTokenAsync(
                    idToken, canceller.Token));
        }
        public async Task IdToken()
        {
            var payload = new Dictionary <string, object>()
            {
                { "iss", "wrong-issuer" },
            };
            var idToken = await IdTokenVerificationTest.CreateTestTokenAsync();

            var auth = this.CreateFirebaseAuth();

            var exception = await Assert.ThrowsAsync <FirebaseAuthException>(
                async() => await auth.VerifySessionCookieAsync(idToken));

            var expectedMessage = "Firebase session cookie has incorrect issuer (iss) claim.";

            this.CheckException(exception, expectedMessage);
        }