Ad
AngularFireAuth With SAMLAuthProvider Does Not Accept Provider Parameter
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'))
Ad
Answer
It's a typescript error that is reported, but you can still send in the parameter (in fact you have to for it to work) and it'll accept it at runtime.
Ad
source: stackoverflow.com
Related Questions
- → Make a Laravel collection into angular array (octobercms)
- → Laravel {!! Form::open() !!} doesn't work within AngularJS
- → Angularjs not working inside laravel form
- → Analysis of Flux implementations
- → how to write react component to construct HTML DOM
- → angular ng-repeat and images in a row
- → Conditional BG Color on AngularJS
- → Should I 'use strict' for every single javascript function I write?
- → getting the correct record in Angular with a json feed and passed data
- → "Undefined is not a function" at .toBe fucntion
- → angularjs data binding issue
- → Angular / JavaScript auto hydrate an instance
- → Convert generic text string in json object into valid url using Angular
Ad