Change Metronic Angular to work with Firebase

379 Views Asked by At

I've been usgin angular version of Metronic to make a angular admin. I put the conections to firebase on enviroment.ts and enviroment.prod.ts after install

npm install firebase @angular/fire --save

export const environment = {
  production: true,
  firebase: {
    apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
    authDomain: "xxxxxxxxxxxxx.firebaseapp.com",
    databaseURL: "https://xxxxxxxxxxx.firebaseio.com",
    projectId: "xxxxxxxxxxx",
    storageBucket: "xxxxxxxxxxx.appspot.com",
    messagingSenderId: "xxxxxxxxxxx",
    appId: "1:xxxxxxxxx:web:xxxxxxxxxxxxxxxxx",
    measurementId: "xxxxxxxxxxxxx"
  }
};

as documentation says, Im also change the line on file:

src/app/modules/_services/auth-http/index.ts

from

export { AuthHTTPService } from './auth-fake-http.service'; // You have to comment this, when your real back-end is done

to

export { AuthHTTPService } from './auth-http.service'; // You have to uncomment this, when your real back-end is done

and comment the lines on app.module.ts

environment.isMockEnabled
      ? HttpClientInMemoryWebApiModule.forRoot(FakeAPIService, {
          passThruUnknownUrl: true,
          dataEncapsulation: false,
        })
      : [],

aldo in app.module.ts I import the library

import { AngularFireModule } from '@angular/fire';

and on ngModules I insert:

AngularFireModule.initializeApp(environment.firebase),

but it still dont have the login working

Someone knows what I still have to do to have it working on Metronic angular admin version

Thanks for helping

0

There are 0 best solutions below