diff --git a/docs/DEV-1.-Getting-Started.md b/docs/DEV-1.-Getting-Started.md index 8e0c0a2ca6..0176d10bff 100644 --- a/docs/DEV-1.-Getting-Started.md +++ b/docs/DEV-1.-Getting-Started.md @@ -96,7 +96,7 @@ The FMTM uses OAUTH2 with OSM to authenticate users. To properly configure your 3. Right now read user preferences permission is enough later on fmtm may need permission to modify the map option which should be updated on OSM_SCOPE variable on .env , Keep read_prefs for now. -4. Now Copy your Client ID and Client Secret. Put them in the `OSM_CLIENT_ID` and `OSM_CLIENT_SECRET` of your `.env` file +4. Now Copy your Client ID and Client Secret. Put them in the `OSM_CLIENT_ID` and `OSM_CLIENT_SECRET` field of your `.env` file ### 2. Create an `.env` File @@ -148,22 +148,24 @@ For details on how to run this project locally for development, please look at: Once you have deployed, you will need to check that you can properly authenticate. -1. Navigate to `API_URL/docs` +1. Navigate to `http://127.0.0.1:8000/docs` Three endpoints are responsible for oauth - image + image -2. Hit `/auth/osm_login/` : This will give you the Login URL where you can supply your osm username/password +2. Select the `/auth/osm_login/` endpoint, click `Try it out` and then `Execute`. + This would give you the Login URL where you can supply your osm username and password. - Response should be like this : + Your response should look like this: {"login_url": "https://www.openstreetmap.org/oauth2/authorize/?response_type=code&client_id=xxxx"} - Now Copy your login_url and hit it in new tab, and you will be redirected to OSM for your LOGIN. Give FMTM the necessary permission + Now copy and paste your login_url in a new tab. You would be redirected to OSM for your LOGIN. Give FMTM the necessary permission. - After successful login, you will get your `access_token` for FMTM Copy it and now you can use it for rest of the endpoints that need authorizations + After a successful login, you will get your `access_token` for FMTM, Copy it. Now, you can use it for rest of the endpoints that needs authorization. -3. Check your access token: Hit `/auth/me/` and pass your `access_token` You should get your osm id, username and profile picture id +3. Check your access token: Select the `/auth/me/` endpoint and click `Try it out`. + Pass in the `access_token` you copied in the previous step into the `access-token` field and click `Execute`. You should get your osm id, username and profile picture id. # Start Developing diff --git a/images/endpoints_responsible_for_auth_screenshot-2023-03-26-092756.png b/images/endpoints_responsible_for_auth_screenshot-2023-03-26-092756.png new file mode 100644 index 0000000000..c215ecc99e Binary files /dev/null and b/images/endpoints_responsible_for_auth_screenshot-2023-03-26-092756.png differ