带有 SAMLAuthProvider 的 AngularFireAuth 不接受提供者参数

AngularFireAuth with SAMLAuthProvider does not accept provider parameter

我正在尝试将 firebase 身份验证模块与自定义 SAML 身份提供程序一起使用,我能够将它与普通的 firebase SDK 一起使用,但我无法使其与 angular/fire/auth[=11= 一起使用]


import { Component, OnInit } from '@angular/core';
import { AngularFireAuth } from '@angular/fire/auth';
import { auth } from 'firebase/app';

@Component({
  selector: 'app-mycomponent',
  templateUrl: './mycomponent.html',
  styleUrls: ['./mycomponent.css']
})
export class MyComponent implements OnInit {
  constructor( public afAuth: AngularFireAuth) { 
  }

  login(){
    this.afAuth.auth.signInWithRedirect(new auth.SAMLAuthProvider('saml.myProvider')); 
   //Error above : Expected 0 arguments, but got 1.ts(2554),

  }

//With Firebase SDK works this way
//firebase.auth().signInWithRedirect(new firebase.auth.SAMLAuthProvider('saml.myProvider'))

报告的是打字稿错误,但您仍然可以发送参数(实际上您必须发送参数才能使其工作),它会在运行时接受它。