Gathering detailed insights and metrics for angular-auth-firebaseui
Gathering detailed insights and metrics for angular-auth-firebaseui
Gathering detailed insights and metrics for angular-auth-firebaseui
Gathering detailed insights and metrics for angular-auth-firebaseui
ngx-auth-firebaseui
Open Source Library for Angular Web Apps to integrate a material user interface for firebase authentication
firebaseui-auth
Stencil Components for Firebase Auth
firebaseui-auth-angular
FirebaseUI Authentication for Angular provides simple, customizable components to make integrating Firebase authentication with Angular applications straightforward.
firebaseui-angular-auth-emulator-fork
[](https://travis-ci.org/RaphaelJenni/FirebaseUI-Angular) [](https://badge.fury.io/js/firebaseui-angula
npm install angular-auth-firebaseui
Typescript
Module System
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Angular UI component for firebase authentication. This library is an angular module (including angular components and services) that allows to authenticate your users with your firebase project. NgxAuthFirebseUI is compatible with angular material and angular flexLayout.
If you prefer to develop with bootstrap rather than with material design, please check this project @firebaseui/ng-bootstrap
Do you have any
question or suggestion ? Please do not hesitate to contact us!
Alternatively, provide a PR | open an appropriate issue here
If you like this project, support angular-auth-firebaseui by starring :star: and sharing it :loudspeaker:
Features | angular-auth-firebaseui | firebaseui |
---|---|---|
Sign Up | :heavy_check_mark: | :heavy_check_mark: |
Sign In | :heavy_check_mark: | :heavy_check_mark: |
Sign In Anonymously | :heavy_check_mark: | :heavy_check_mark: |
Sign In with Google | :heavy_check_mark: | :heavy_check_mark: |
Sign In with Facebook | :heavy_check_mark: | :heavy_check_mark: |
Sign In with Twitter | :heavy_check_mark: | :heavy_check_mark: |
Sign In with Github | :heavy_check_mark: | :heavy_check_mark: |
Sign In with Microsoft | :heavy_check_mark: | :heavy_check_mark: |
Sign In with Yahoo | :heavy_check_mark: | :heavy_check_mark: |
Sign In with Phonenumber | :x: | :heavy_check_mark: |
Sign out | :heavy_check_mark: | :x: |
Sign in/up progress indicator | :heavy_check_mark: | :x: |
Password Strength indicator | :heavy_check_mark: | :x: |
Forgot/Reset Password | :heavy_check_mark: | :x: |
Password Strength Meter | :heavy_check_mark: | :x: |
Delete account | :heavy_check_mark: | :x: |
Login Authentication Guard | :heavy_check_mark: | :x: |
User Profile | :heavy_check_mark: | :x: |
Check whether user's email is verified | :heavy_check_mark: | :x: |
Edit user's display name (incl. validation) | :heavy_check_mark: | :x: |
Edit user's email (incl. validation) | :heavy_check_mark: | :x: |
Edit user's phone number (incl. validation) | :heavy_check_mark: | :x: |
Configure your favorite auth provider in runtime | :heavy_check_mark: | :x: |
Sync user'auth with Firestore read more | :heavy_check_mark: | :x: |
Animations | :heavy_check_mark: | :x: |
Angular v2-8 friendly | :heavy_check_mark: | :x: |
Internationalization (i18n) | :heavy_check_mark: | :heavy_check_mark: |
Ionic/cordova support | :soon: @firebaseui/ionic-auth | :x: |
Real time form validation | :heavy_check_mark: | :x: |
Easy to integrate | :heavy_check_mark: | :x: |
Support Server Side Rendering | :heavy_check_mark: | :x: |
Support SPA without further config | :heavy_check_mark: | :x: |
Support Safari private browsing | :heavy_check_mark: | :interrobang: |
AWESOME | :heavy_check_mark: | :interrobang: |
any
important event occurred.angular-auth-firebaseui-user
<angular-auth-firebaseui>
used for the authentication process see more<angular-auth-firebaseui-register>
standalone registration component to create new accounts see more<angular-auth-firebaseui-login>
standalone login component to use already created accounts see more<angular-auth-firebaseui-providers>
used to display only buttons for providers like google, facebook, twitter, github, microsoft and yahoo see more<angular-auth-firebaseui-user>
used to display/edit the data of the current authenticated user in form of a material card see more<angular-auth-firebaseui-avatar>
used to display/edit the data of the current authenticated user in the toolbar see morenumber
:soon:number
LoggedInGuard
used to protect angular routes from unauthenticated users (with fallback routes via NgxAuthFirebaseUIConfig
)the full tutorial guide can be found here
take a look at live example with firestore's synchronization here
v8
in combination with angular-auth-firebaseui-user
v7
Please note: when the view port is getting too small, the layout will be
automatically change to column
1"peerDependencies": { 2 "@angular/core": "^8.x", 3 "@angular/animations": "^8.x", 4 "@angular/cdk": "^8.x", 5 "@angular/flex-layout": "^8.0.0-beta.27", 6 "@angular/forms": "^8.x", 7 "@angular/material": "^8.x", 8 "@angular/fire": "5.3.x", 9 "firebase": "7.x", 10 }
If you are still running angular v5, please consider to user angular-auth-firebaseui
v0.x
v1.x should be used with angular v7 projects v3.x should be used with angular v8 projects
the @angular-material-extensions/password-strength is used to indicate how secure is the provided password when registering a new firebase user e.g:
If Angular Material Design is not setup, just run ng add @angular/material
learn more
Now add the library via the angular schematics
1ng add angular-auth-firebaseui
angular-auth-firebaseui
's module will be automatically imported to the root module (just replace PUT_YOUR_FIREBASE_API_KEY_HERE
with your firebase api key)angular-auth-firebaseui
's assets will be automatically added the angular.json
fileInstall above dependencies via npm.
Now install angular-auth-firebaseui
via:
1npm install --save angular-auth-firebaseui
1npm i -s @angular/material @angular/cdk @angular/flex-layout @angular/forms @angular/animations @angular/router
Firebase deps
1npm i -s firebase @angular/fire
-> continue by following the instructions
here
Once installed you need to import the main module:
1import { NgxAuthFirebaseUIModule } from 'angular-auth-firebaseui';
The only remaining part is to list the imported module in your application module. The exact method will be slightly
different for the root (top-level) module for which you should end up with the code similar to (notice NgxAuthFirebaseUIModule .forRoot()
):
and then from your Angular AppModule
:
1import { BrowserModule } from '@angular/platform-browser'; 2import { NgModule } from '@angular/core'; 3 4import { AppComponent } from './app.component'; 5 6// Import your library 7import { NgxAuthFirebaseUIModule } from 'angular-auth-firebaseui'; 8import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; 9 10@NgModule({ 11 declarations: [ 12 AppComponent 13 ], 14 imports: [ 15 BrowserModule, 16 BrowserAnimationsModule, 17 18 // Specify the angular-auth-firebaseui library as an import 19 NgxAuthFirebaseUIModule.forRoot({ 20 apiKey: 'your-firebase-apiKey', 21 authDomain: 'your-firebase-authDomain', 22 databaseURL: 'your-firebase-databaseURL', 23 projectId: 'your-firebase-projectId', 24 storageBucket: 'your-firebase-storageBucket', 25 messagingSenderId: 'your-firebase-messagingSenderId' 26 }), 27 ], 28 providers: [], 29 bootstrap: [AppComponent] 30}) 31export class AppModule { } 32
Other modules in your application can simply import NgxAuthFirebaseUIModule
:
1import { NgxAuthFirebaseUIModule } from 'angular-auth-firebaseui'; 2 3@NgModule({ 4 declarations: [OtherComponent, ...], 5 imports: [NgxAuthFirebaseUIModule, ...], 6}) 7export class OtherModule { 8}
Note:If you are using
SystemJS
, you should adjust your configuration to point to the UMD bundle. In your systemjs config file,map
needs to tell the System loader where to look forangular-auth-firebaseui
:
1map: { 2 'angular-auth-firebaseui': 'node_modules/angular-auth-firebaseui/bundles/angular-auth-firebaseui.umd.js', 3}
1import { BrowserModule } from '@angular/platform-browser'; 2import { NgModule } from '@angular/core'; 3 4import { AppComponent } from './app.component'; 5 6// Import your library 7import { NgxAuthFirebaseUIModule } from 'angular-auth-firebaseui'; 8import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; 9 10@NgModule({ 11 declarations: [ 12 AppComponent 13 ], 14 imports: [ 15 BrowserModule, 16 BrowserAnimationsModule, 17 18 // Specify the angular-auth-firebaseui library as an import 19 NgxAuthFirebaseUIModule.forRoot( 20 { 21 apiKey: 'your-firebase-apiKey', 22 authDomain: 'your-firebase-authDomain', 23 databaseURL: 'your-firebase-databaseURL', 24 projectId: 'your-firebase-projectId', 25 storageBucket: 'your-firebase-storageBucket', 26 messagingSenderId: 'your-firebase-messagingSenderId' 27 }, 28 () => 'your_app_name_factory', 29 { 30 enableFirestoreSync: true, // enable/disable autosync users with firestore 31 toastMessageOnAuthSuccess: false, // whether to open/show a snackbar message on auth success - default : true 32 toastMessageOnAuthError: false, // whether to open/show a snackbar message on auth error - default : true 33 authGuardFallbackURL: '/loggedout', // url for unauthenticated users - to use in combination with canActivate feature on a route 34 authGuardLoggedInURL: '/loggedin', // url for authenticated users - to use in combination with canActivate feature on a route 35 passwordMaxLength: 60, // `min/max` input parameters in components should be within this range. 36 passwordMinLength: 8, // Password length min/max in forms independently of each componenet min/max. 37 // Same as password but for the name 38 nameMaxLength: 50, 39 nameMinLength: 2, 40 // If set, sign-in/up form is not available until email has been verified. 41 // Plus protected routes are still protected even though user is connected. 42 guardProtectedRoutesUntilEmailIsVerified: true, 43 enableEmailVerification: true, // default: true 44 }), 45 ], 46 providers: [], 47 bootstrap: [AppComponent] 48}) 49export class AppModule { } 50
Once the library is imported, you can use its components, directives and pipes in your Angular application:
<angular-auth-firebaseui></angular-auth-firebaseui>
see the usage<angular-auth-firebaseui-login></angular-auth-firebaseui-login>
see the usage<angular-auth-firebaseui-register></angular-auth-firebaseui-register>
see the usage<angular-auth-firebaseui-providers></angular-auth-firebaseui-providers>
see the usage<angular-auth-firebaseui-user></angular-auth-firebaseui-user>
see the usage<angular-auth-firebaseui-avatar></angular-auth-firebaseui-avatar>
see the usage<angular-auth-firebaseui></angular-auth-firebaseui>
see the api<angular-auth-firebaseui-providers></angular-auth-firebaseui-login>
see the api<angular-auth-firebaseui-providers></angular-auth-firebaseui-register>
see the api<angular-auth-firebaseui-providers></angular-auth-firebaseui-providers>
see the api<angular-auth-firebaseui-user></angular-auth-firebaseui-user>
see the api<angular-auth-firebaseui-user></angular-auth-firebaseui-avatar>
see the apiIf you want to prevent a route to be accessed from non authorized users, you can
use a built in LoggedInGuard
angular router guard.
NgxAuthFirebaseUIConfig
under authGuardFallbackURL
NgxAuthFirebaseUIConfig
under authGuardLoggedInURL
1import {NgxAuthFirebaseUIModule} from 'angular-auth-firebaseui';
2
3
4NgxAuthFirebaseUIModule.forRoot(firebaseKey, firebaseAppNameFactory,
5 {
6 authGuardFallbackURL: 'examples/logged-out',
7 authGuardLoggedInURL: 'examples/logged-in',
8 }),
if the user is logged in, he will be redirected to examples/logged-in
route (per example),
otherwise he will be redirected to the examples/logged-out
route
LoggedInGuard
in your router module1import {NgModule} from '@angular/core'; 2import {Routes, RouterModule} from '@angular/router'; 3 4import {LoggedInGuard} from 'angular-auth-firebaseui'; 5 6const routes: Routes = [ 7 { 8 path: '', 9 redirectTo: 'home', 10 pathMatch: 'full' 11 }, 12 { 13 path: 'secured', 14 loadChildren: 'app/secured/secured.module#SecuredModule', 15 canActivate: [LoggedInGuard] 16 } 17]; 18 19@NgModule({ 20 imports: [RouterModule.forRoot(routes)], 21 exports: [RouterModule] 22}) 23export class AppRoutingModule { 24} 25
Built by and for developers :heart: we will help you :punch:
This project is supported by jetbrains with 1 ALL PRODUCTS PACK OS LICENSE incl. webstorm
Copyright (c) 2019 Anthony Nahas. Licensed under the MIT License (MIT)
No vulnerabilities found.
No security vulnerabilities found.