AngularFireAuth with SAMLAuthProvider does not accept provider parameter

时间:2019-05-22 18:37:09

标签: angular firebase firebase-authentication angularfire2 angularfire

I'm trying to use the firebase auth module with a Custom SAML Identity Provider, I was able to use it with the plain firebase SDK but I can not make it work with angular/fire/auth


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'))

1 个答案:

答案 0 :(得分:0)

这是一个报告的打字错误,但是您仍然可以发送参数(实际上您必须使它起作用),并且它将在运行时接受。