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: username-password-auth/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,16 @@ This sample shows how to authenticate with a username/password to Sign-In with F
4
4
5
5
NOTE: [Firebase Authentication](https://firebase.google.com/docs/auth/web/password-auth) can be used for email address/password sign in. This sample specifically addresses the case in which an email address is not used as the unique identifier for a user.
6
6
7
-
## Setup the sample
7
+
## Set up the sample
8
8
9
-
Create and setup the Firebase project:
9
+
Create and set up the Firebase project:
10
10
1. Create a Firebase project using the [Firebase Developer Console](https://console.firebase.google.com).
11
11
1. Enable Billing on your Firebase project by switching to the **Blaze** plan, this is currently needed to be able to perform HTTP requests to external services from a Cloud Function.
12
-
1. Copy the Web initialisation snippet from **Firebase Console > Overview > Add Firebase to your web app** and paste it in `public/index.html` in lieu of the placeholder (where the `TODO(DEVELOPER)` is located).
12
+
1. Copy the Web initialization snippet from **Firebase Console > Overview > Add Firebase to your web app** and paste it in `public/index.html` in lieu of the placeholder (where the `TODO(DEVELOPER)` is located).
13
13
14
14
Create and provide a Service Account's credentials:
15
-
1. Create a Service Accounts file as described in the [Server SDK setup instructions](https://firebase.google.com/docs/server/setup#add_firebase_to_your_app).
16
-
1. Save the Service Account credential file as `./functions/service-account.json`
15
+
1. Create a service account file as described in the [Server SDK setup instructions](https://firebase.google.com/docs/server/setup#add_firebase_to_your_app).
16
+
1. Save the service account credential file as `./functions/service-account.json`
17
17
18
18
Deploy your project:
19
19
1. Run `firebase use --add` and choose your Firebase project. This will configure the Firebase CLI to use the correct project locally.
@@ -28,10 +28,10 @@ Enter credentials and click on the **Sign in** button. At this point you are aut
28
28
29
29
## Workflow and design
30
30
31
-
When clicking the **Sign in** button the `auth` Cloud Function authenticates the username/password then Mints and returns a Firebase Custom Auth token (which is why we need Service Accounts Credentials).
31
+
When clicking the **Sign in** button the `auth` Cloud Function authenticates the username/password then Mints and returns a Firebase Custom Auth token (which is why we need service accounts credentials).
32
32
33
33
The [httpbin](https://httpbin.org) request & response service is used for the basic authentication request in this example.
34
34
35
-
The main page will detect the sign-in through the Firebase Auth State observer and display the signed-In user information.
35
+
The main page will detect the sign-in through the Firebase Auth State observer and display the signed-in user information.
36
36
37
37
NOTE: In production you'll need to update the placeholder `authenticate` function in `./functions/index.js` so that it authenticates with your own credentials system.
0 commit comments