Skip to content

Commit e52ceb2

Browse files
committed
Update README now that OAuth login works on localhost
1 parent adb3a0c commit e52ceb2

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

README.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,17 @@ Other relevant repositories that contain parts of the OSMCha application are:
1212
To set up a local development environment:
1313

1414
1. Install Node.js and npm. The recommended Node.js version is listed in [.tool-versions](./.tool-versions). Tool managers like [asdf](https://asdf-vm.com/) or [mise](https://mise.jdx.dev/) can read this file and install the right version for you if you want.
15-
1. Run `npm install` to install the required JavaScript dependencies.
16-
1. Run `npm run start` to start the frontend (it will rebuild automatically when you make changes)
17-
1. Open [http://127.0.0.1:3000](http://127.0.0.1:3000)
18-
19-
Note: if you are running the frontend against the production backend (the
20-
default), you won't be able to use OAuth to log in through the UI. Instead
21-
you can copy your auth token from the DevTools console on the production
22-
website (`localStorage.getItem("token")`) and then paste it into the console
23-
on the development site (`localStorage.setItem("token", <value>)`). Refresh
24-
the page and you should now be logged in.
25-
26-
If you are running your own local copy of the
27-
[`osmcha-django`](https://github.com/OSMCha/osmcha-django) backend, you'll
28-
need to register your own OAuth app on openstreetmap.org, configure the backend
29-
to use that secret key, and then point this frontend at your local backend by
30-
setting the `OSMCHA_API_URL` environment variable. After that, normal OAuth
31-
login through the frontend UI should work.
15+
2. Run `npm install` to install the required JavaScript dependencies.
16+
3. Run `npm run start` to start the frontend (it will rebuild automatically when you make changes)
17+
4. Open [http://127.0.0.1:3000](http://127.0.0.1:3000)
18+
19+
If you are running the frontend against the production backend (the default),
20+
then OAuth login will work automatically. If you are running your own local
21+
copy of the [`osmcha-django`](https://github.com/OSMCha/osmcha-django) backend,
22+
you'll need to register your own OAuth app on openstreetmap.org, configure
23+
the backend to use that secret key, and then point this frontend at your local
24+
backend by setting the `OSMCHA_API_URL` environment variable. After that, normal
25+
OAuth login through the frontend UI should work.
3226

3327
### Testing and quality checks
3428

0 commit comments

Comments
 (0)