Skip to content

Commit

Permalink
Merge pull request #348 from developmentseed/fix/auth-instructions
Browse files Browse the repository at this point in the history
Fix auth setup instructions
  • Loading branch information
kamicut authored Dec 16, 2022
2 parents 62fd726 + 19eea33 commit 43534ba
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@ Install requirements:
- [nvm](https://github.com/creationix/nvm)
- [Docker](https://www.docker.com)

Visit your [OpenStreetMap settings](https://www.openstreetmap.org/account/edit) page and [register an OAuth2 app](https://www.openstreetmap.org/oauth2/applications) with the following settings:

- Name: `OSM Teams Dev` (or another name of your preference)
- Redirect URIs: `http://127.0.0.1:3000/api/auth/callback/openstreetmap`
- Confidential application: `false`
- Permissions: `Read user preferences` only

Example:

![OSM Client App](oauth2-osm-client-app.png "OAuth 2 page at OSM Website")

Create an `.env.local` file and add environment variables `OSM_CONSUMER_KEY` and `OSM_CONSUMER_SECRET` obtained at OAuth2 page at OpenStreetMap website. The `.env.local` file should be like the following:

OSM_CONSUMER_KEY=<osm-oauth2-client-id>
OSM_CONSUMER_SECRET=<osm-oauth2-client-secret>
Setup local authentication:

- Visit [auth.mapping.team](https://auth.mapping.team) and sign in
- Go to clients page at <https://auth.mapping.team/clients>
- Create a new app with the following settings:
- Name: `OSM Teams Dev` (or another name of your preference)
- Redirect URIs: `http://127.0.0.1:3000/api/auth/callback/osm-teams`
- Copy client id and secret to a newly created file named `.env.local` in the repository root, following this example:

```sh
OSM_CONSUMER_KEY=<client-id>
OSM_CONSUMER_SECRET=<client-secret>
```

Start development and test databases with Docker:

Expand Down

0 comments on commit 43534ba

Please sign in to comment.