angular - Angularfire 2 Error: The specified authentication provider is not enabled for this Firebase -


i creating simple sample auth app ionic 2 , angularfire 2 backend, when try create new user says:

exception: error: uncaught (in promise): error: specified authentication provider not enabled firebase.

but enabled firebase authentication in firebase console:enter image description here

app.ts

import {app, platform} 'ionic-angular'; import {statusbar} 'ionic-native'; import {homepage} './pages/home/home'; import { firebase_providers, defaultfirebase, firebaseauthconfig, authproviders, authmethods } 'angularfire2';  @app({   template: '<ion-nav [root]="rootpage"></ion-nav>',   providers: [     firebase_providers,     defaultfirebase('https://samplequizapp-50eb5.firebaseio.com'),     firebaseauthconfig({       provider: authproviders.password,       method: authmethods.password     })   ],   config: {} // http://ionicframework.com/docs/v2/api/config/config/ }) export class myapp {   rootpage: = homepage;    constructor(platform: platform) {     platform.ready().then(() => {       // okay, platform ready , our plugins available.       // here can higher level native things might need.       statusbar.styledefault();     });   } } 

home.ts

import { page } 'ionic-angular'; import { angularfire, firebaselistobservable } 'angularfire2'; import { oninit } '@angular/core'  @page({   templateurl: 'build/pages/home/home.html' }) export class homepage implements oninit {   user: = {};   data: firebaselistobservable<any[]>;    constructor(private af: angularfire) {   }    ngoninit() {     this.data = this.af.database.list('/userid')   }    signup(data) {     this.af.auth.createuser({       email: data.email,       password: data.password     })   }  } 

i pretty sure there nothing wrong code:

firebase2 in current version (2.4.2) not yet compatible firebase sdk v3, , projects created new firebase console accessible calls comaptible sdk v3.

you want create firebase backend in legacy console www.firebase.com first, , migrate new console.

this documented in closed issue of angularfire2 github: https://github.com/angular/angularfire2/issues/189


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -