Skip to content

Commit 5b67cbf

Browse files
committed
Update demo app README with troubleshooting steps
1 parent c1b9cf1 commit 5b67cbf

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

packages/auth/demo/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ in the `config.js` file.
4444

4545
Before deploying, you may need to build the auth package:
4646
```bash
47+
yarn
4748
yarn build:deps
4849
```
4950

@@ -58,6 +59,20 @@ yarn run demo
5859
This will compile all the files needed to run Firebase Auth, and start a Firebase server locally at
5960
[http://localhost:5000](http://localhost:5000).
6061

62+
The demo opens a page like this:
63+
64+
![image](https://user-images.githubusercontent.com/35932340/153662957-41ba6a82-ea15-4084-ad3a-9fd41083efd3.png)
65+
66+
67+
This is a developer view of all the supported auth flows. Make sure that the auth flow you are testing is already enabled in your firebase project.
68+
For example, if you are testing “Sign up with email/password”, your project should allow email/password as a provider.
69+
If not, you will see an “auth/operation-not-allowed” error message.
70+
71+
You can check the enabled providers on the firebase console.
72+
73+
![image](https://user-images.githubusercontent.com/35932340/153662750-c0faf417-07b4-4f0e-93ab-5e0b82e3c793.png)
74+
75+
6176
## Running against Auth Emulator
6277

6378
The demo page by default runs against the actual Auth Backend. To run against the Auth Emulator with mocked endpoints, do the following:
@@ -74,3 +89,43 @@ The demo page by default runs against the actual Auth Backend. To run against th
7489
yarn run demo:emulator
7590
```
7691

92+
## Troubleshooting
93+
94+
### Errors about dependency not being installed, example `lerna: command not found`
95+
96+
Ensure that you run `yarn` to install dependencies.
97+
98+
### `Failed to get Firebase project <project name>. Please make sure the project exists and your account has permission to access it.`
99+
100+
101+
Logout, re-login and launch the demo
102+
103+
```bash
104+
firebase logout && firebase login && yarn demo
105+
```
106+
107+
### `Access to localhost was denied` when accessing the demo app via http://localhost:5000
108+
109+
110+
111+
Access the demo app via http://127.0.0.1:5000 or run
112+
113+
```bash
114+
yarn demo --project <project name> --host 127.0.0.1
115+
```
116+
and access via http://127.0.0.1:5000
117+
118+
Note - If you use 127.0.0.1 in your browser, you need to allowlist it as a domain for sign in, as shown below.
119+
120+
![image](https://user-images.githubusercontent.com/35932340/153659058-d669055f-b587-4bc2-9f32-323149df50c3.png)
121+
122+
123+
### Error message about functions
124+
125+
`The Cloud Functions emulator requires the module "firebase-admin" to be installed. This package is in your package.json, but it's not available. You probably need to run "npm install" in your functions directory.
126+
i functions: Your functions could not be parsed due to an issue with your node_modules (see above)
127+
`
128+
129+
Run `npm install` inside the auth/demo/functions directory as mentioned in the error message.
130+
131+

0 commit comments

Comments
 (0)