1.0.3 • Published 5 years ago

ngx-angularfire-auth v1.0.3

Weekly downloads
21
License
MIT
Repository
github
Last release
5 years ago

NgxAngularfireAuth

This library was generated with Angular CLI version 8.2.13.

Install

npm install ngx-angularfire-auth

Usage

Provide the service:

import { NgxAngularFireAuthService } from 'ngx-angularfire-auth';

@NgModule({
  providers: [NgxAngularFireAuthService],
})
export class AppModule {}

Use the service in a component:

import { Component } from '@angular/core';
import { NgxAngularFireAuthService } from 'ngx-angularfire-auth';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
})
export class AppComponent {
  constructor(private authService: NgxAngularFireAuthService) {}

  signIn(email: string, password: string) {
    this.authService
      .signInWithEmailAndPassword(email, password)
      .subscribe(() => {
        // do something
      });
  }
}