@@ -7,18 +7,16 @@ of authentication, you can specify that ahead of time so you only need to call
7
7
8
8
## Configure application in bootstrap
9
9
10
- To specify your authentication ahead of time, you provide the ` bootstrap ` array
11
- with the ` firebaseAuthConfig ` service.
12
-
13
- The ` firebaseAuthConfig ` services takes in an ` AuthProvider ` and an ` AuthMethod ` .
10
+ To specify your authentication ahead of time, you provide the ` AngularFireModule.initializeApp ` function
11
+ with an ` AuthProvider ` and an ` AuthMethod ` .
14
12
15
13
``` ts
16
14
17
15
const myFirebaseConfig = {
18
- apiKey: " <your-key>" ,
19
- authDomain: " <your-project-authdomain>" ,
20
- databaseURL: " <your-database-URL>" ,
21
- storageBucket: " <your-storage-bucket>" ,
16
+ apiKey: ' <your-key>' ,
17
+ authDomain: ' <your-project-authdomain>' ,
18
+ databaseURL: ' <your-database-URL>' ,
19
+ storageBucket: ' <your-storage-bucket>' ,
22
20
}
23
21
24
22
const myFirebaseAuthConfig = {
@@ -37,33 +35,6 @@ const myFirebaseAuthConfig = {
37
35
export class MyAppModule {}
38
36
```
39
37
40
- ** Example bootstrap**
41
- ``` ts
42
- import { bootstrap } from ' @angular/platform-browser-dynamic' ;
43
- import { enableProdMode } from ' @angular/core' ;
44
- import { AppComponent , environment } from ' ./app/' ;
45
- import {FIREBASE_PROVIDERS ,
46
- defaultFirebase ,
47
- AngularFire ,
48
- AuthMethods ,
49
- AuthProviders ,
50
- firebaseAuthConfig } from ' angularfire2' ;
51
-
52
- if (environment .production ) {
53
- enableProdMode ();
54
- }
55
-
56
- bootstrap (<MyApp >Component , [
57
- FIREBASE_PROVIDERS ,
58
- defaultFirebase ({
59
- // config object
60
- }),
61
- firebaseAuthConfig ({
62
- provider: AuthProviders .Twitter ,
63
- method: AuthMethods .Redirect
64
- })
65
- ]);
66
- ```
67
38
68
39
## Login users
69
40
0 commit comments