You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+162-2Lines changed: 162 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,13 @@ This repository contains the source code for the FirebaseUI for Web project rewr
4
4
5
5
## Installation
6
6
7
-
To get started, install the React or Angular package:
7
+
FirebaseUI requires the `firebase` package to be installed:
8
+
9
+
```bash
10
+
npm intall firebase
11
+
```
12
+
13
+
Next, follow the installation flow for your framework:
8
14
9
15
<details>
10
16
<summary>React</summary>
@@ -17,7 +23,161 @@ To get started, install the React or Angular package:
17
23
<details>
18
24
<summary>Angular</summary>
19
25
26
+
FirebaseUI for Angular dependes on the [AngularFire](https://github.com/angular/angularfire) package:
27
+
20
28
```bash
21
-
npm install @firebase-ui/angular
29
+
npm install @firebase-ui/angular @angular/fire
30
+
```
31
+
</details>
32
+
33
+
34
+
## Setup
35
+
36
+
FirebaseUI requires that your Firebase app is setup following the [Getting Started with Firebase](https://firebase.google.com/docs/web/setup) flow for Web:
37
+
38
+
```ts
39
+
import { initializeApp } from'firebase/app';
40
+
41
+
const app =initializeApp({ ... });
42
+
```
43
+
44
+
Next, setup and configure FirebaseUI, import the `initializeUI` function from `@firebase-ui/core`:
45
+
46
+
```ts
47
+
import { initializeUI } from"@firebase-ui/core";
48
+
49
+
const ui =initializeUI();
50
+
```
51
+
52
+
> To learn more about configuring FirebaseUI, view the [configuration](#configuration) section.
53
+
54
+
Next, follow the flow for your framework to setup FirebaseUI:
55
+
56
+
<details>
57
+
<summary>React</summary>
58
+
59
+
FirebaseUI for React requires that your application be wrapped in the `ConfigProvider`, providing the initalized UI configuration. React expects the `FirebaseApp` instance be provided to the `initializeUI` configuration:
FirebaseUI depends on [AngularFire](https://github.com/angular/angularfire) being configured to inject Firebase Auth into your Angular application. Additionally, the `provideFirebaseUI` function is required to inject FirebaseUI into your application:
Next, import the CSS styles for the FirebaseUI project.
103
+
104
+
If you are using [TailwindCSS](https://tailwindcss.com/), import the base CSS from the `@firebase-ui/styles` package after your Tailwind import:
105
+
106
+
```css
107
+
@import"tailwindcss";
108
+
@import"@firebase-ui/styles/src/base.css";
109
+
```
110
+
111
+
If you are not using Tailwind, import the distributable CSS in your project:
112
+
113
+
```css
114
+
@import"@firebase-ui/styles/dist.css";
115
+
```
116
+
117
+
> To learn more about theming, view the [theming](#theming) section.
118
+
119
+
## Authentication Components
120
+
121
+
FirebaseUI provides a number of opinionated components designed to drop into your application which handle common user flows, such as signing in or registration.
122
+
123
+
### Sign-in
124
+
125
+
Allows users to sign in with an email and password:
0 commit comments