Skip to content

Commit d5a8375

Browse files
authored
Merge pull request #18 from jeroenouw/ngx-auth
Added ngx-auth-firebaseui for replacing authentication part
2 parents dee5e55 + cad4399 commit d5a8375

24 files changed

+999
-1713
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A full stack starter app containing [Angular 7](https://angular.io), [Material](
2323

2424
[Discover all the features in this project](https://github.com/jeroenouw/AngularMaterialFirebase/blob/master/docs/FEATURES.md)
2525

26-
## Automated documentation
26+
## [Live automated documentation](http://ngxmatfire-docs.jerouw.nl)
2727

2828
[Generate technical documentation automatically with Compodoc](https://github.com/jeroenouw/AngularMaterialFirebase/blob/master/docs/COMPODOC.md)
2929

angular.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@
2020
"polyfills": "src/polyfills.ts",
2121
"assets": [
2222
"src/assets",
23-
"src/favicon.ico"
23+
"src/favicon.ico",
24+
{
25+
"glob": "**/*",
26+
"input": "node_modules/ngx-auth-firebaseui/assets/",
27+
"output": "./assets/"
28+
}
2429
],
2530
"styles": [
2631
"src/styles.scss"

docs/FEATURES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Login page
1717
* Signup page
1818
* Save email (keep in touch)
19-
* Authentication (Anonymous, Email, Google, Twitter, Facebook and Github)
19+
* ngx-auth-firebaseui for authentication (Anonymous, Email, Google, Twitter, Facebook and Github)
2020
* Verification email after signup
2121
* Auth Guard
2222
* Profile image animation

package-lock.json

Lines changed: 926 additions & 1190 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngxmatfire",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"author": "Jeroen Ouwehand",
55
"description": "Full stack starter app with Angular 7, Material Design and Firebase.",
66
"keywords": [
@@ -38,16 +38,18 @@
3838
"@angular/common": "^7.1.0",
3939
"@angular/compiler": "^7.1.0",
4040
"@angular/core": "^7.1.0",
41+
"@angular/fire": "^5.1.1",
42+
"@angular/flex-layout": "^7.0.0-beta.23",
4143
"@angular/forms": "^7.1.0",
42-
"@angular/http": "^7.1.0",
4344
"@angular/material": "^7.1.0",
4445
"@angular/platform-browser": "^7.1.0",
4546
"@angular/platform-browser-dynamic": "^7.1.0",
4647
"@angular/platform-server": "^7.1.0",
4748
"@angular/router": "^7.1.0",
4849
"core-js": "^2.5.7",
49-
"firebase": "^5.5.1",
50+
"firebase": "^5.7.3",
5051
"hammerjs": "^2.0.8",
52+
"ngx-auth-firebaseui": "^2.2.1",
5153
"rxjs": "^6.3.3",
5254
"rxjs-compat": "^6.3.3",
5355
"ts-helpers": "*",
@@ -74,7 +76,7 @@
7476
"rxjs-tslint": "^0.1.5",
7577
"ts-node": "^7.0.1",
7678
"tslint": "^5.12.0",
77-
"typescript": "^3.2.2",
79+
"typescript": "^3.1.6",
7880
"webpack": "^4.28.2"
7981
}
8082
}

src/app/app.component.html

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
<app-header></app-header><br />
44
<router-outlet></router-outlet>
5-
6-
<!-- See messages, users and stay in touch in console log -->
7-
<div id="messages"> </div>
8-
<div id="users"> </div>
9-
<div id="touch"> </div>
10-
11-
<app-footer></app-footer>
5+
<app-footer></app-footer>
126

137
</mat-sidenav-container>

src/app/app.component.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,5 @@ export class AppComponent implements OnInit {
1919
storageBucket: 'angular4materialdesign.appspot.com',
2020
messagingSenderId: '136985605193'
2121
});
22-
23-
// See users and keep in touch in console log
24-
25-
// const preUsers = document.getElementById('users');
26-
// const dbRefUsers = firebase.database().ref().child('users');
27-
// dbRefUsers.on('value', snap => console.log(snap.val()));
28-
29-
// const preTouch = document.getElementById('touch');
30-
// const dbRefTouch = firebase.database().ref().child('touch');
31-
// dbRefTouch.on('value', snap => console.log(snap.val()));
3222
}
3323
}

src/app/app.module.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { MatButtonModule, MatCheckboxModule, MatMenuModule, MatInputModule, MatS
77
MatCardModule, MatTabsModule, MatIconModule } from '@angular/material';
88
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
99
import { HttpClientModule } from '@angular/common/http';
10+
import { NgxAuthFirebaseUIModule } from 'ngx-auth-firebaseui';
1011

1112
// Modules
1213
import { BlocksModule } from './components/blocks/blocks.module';
@@ -66,7 +67,15 @@ import { EmailMeComponent } from './components/email-me/email-me.component';
6667
AuthModule,
6768
BackgroundsModule,
6869
ProfileModule,
69-
MiscModule
70+
MiscModule,
71+
NgxAuthFirebaseUIModule.forRoot({
72+
apiKey: 'AIzaSyBUYZcc_HKi1TckbZPpSjSkxyFvml3Is0A',
73+
authDomain: 'angular4materialdesign.firebaseapp.com',
74+
databaseURL: 'https://angular4materialdesign.firebaseio.com',
75+
projectId: 'angular4materialdesign',
76+
storageBucket: 'angular4materialdesign.appspot.com',
77+
messagingSenderId: '136985605193'
78+
})
7079
],
7180
providers: [
7281
UserService,

src/app/app.routing.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import { PageNotFoundComponent } from './pages/not-found/not-found.component';
99
import { HomeComponent } from './pages/home/home.component';
1010
import { AboutMeComponent } from './pages/about-me/about-me.component';
1111
import { ContactComponent } from './pages/contact/contact.component';
12-
import { SignupComponent } from './pages/auth/signup.component';
13-
import { SigninComponent } from './pages/auth/signin.component';
12+
import { AuthComponent } from './pages/auth/auth.component';
1413
import { ProfileComponent } from './pages/profile/profile.component';
1514
import { ProfileSettingsComponent } from './pages/profile/profile-settings.component';
1615

@@ -29,8 +28,7 @@ const appRoutes: Routes = [
2928
{ path: 'about', component: AboutMeComponent },
3029
{ path: 'contact', component: ContactComponent },
3130
{ path: 'misc', component: MiscComponent },
32-
{ path: 'signup', component: SignupComponent },
33-
{ path: 'login', component: SigninComponent },
31+
{ path: 'auth', component: AuthComponent },
3432

3533
// Protected pages
3634
// { path: 'profile/:uid/:name', component: ProfileComponent, canActivate: [AuthGuardService] },
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<form class="form" [formGroup]="form" (ngSubmit)="onSubmit(f)" #f="ngForm">
1+
<form class="form" [formGroup]="form" (ngSubmit)="onSubmit(f)" #f="ngForm">
22
<mat-card>
33
<h3>Keep in touch!</h3>
44
<mat-form-field class="full-width">
55
<input matInput formControlName="email" placeholder="Your Email" type="email" required>
66
</mat-form-field>
77
<div *ngIf="!form.controls.email.valid && form.controls.email.dirty">
8-
<p>Please enter a valid email.</p>
8+
Please enter a valid email.
99
</div>
1010
<br />
1111
<button mat-raised-button class="primary" type="submit" [disabled]="form.invalid">Submit</button>
1212
</mat-card>
13-
</form>
13+
</form>

0 commit comments

Comments
 (0)