hotosm / osm-tasking-manager2

Designed and built for Humanitarian OpenStreetMap Team collaborative emergency/disaster mapping, the OSM Tasking Manager 2.0 divides an area into individual squares that can be rapidly mapped by thousands of volunteers.
http://tasks.hotosm.org
Other
425 stars 156 forks source link

Users not able to authenticate #1004

Open jeffdefacto opened 6 years ago

jeffdefacto commented 6 years ago

I've tested this on several different instances of OSMTM 2 and it appears that users can no longer successfully log in. When users try to grant access to their account, the TM throws an invalid token error. It seems to be an issue with the osm api, but I haven't heard of anything changing.

You can try it here http://tasks.openstreetmap.id/

ethan-nelson commented 6 years ago

Hi @jeffdefacto thanks for the report. If there was the possibility of getting access to the error logs on one of these instances, I may be able to debug this further. I unfortunately don't have a TM2 instance up and running at the moment as I've shifted my dev efforts to TM3.

jeffdefacto commented 6 years ago

Hi @ethan-nelson thanks for taking a look. I've attached the error message associated with this. Let me know if you need more.

error_message.txt

jeffdefacto commented 6 years ago

We've discovered the issue. The api url for USER_DETAILS_URL needs to be https now.

adisadit commented 6 years ago

Hi @jeffdefacto my local TM 2 also get this problem. Any user who want to log in seem get internal server error issue. Could you tell me in detail how to solve this problem? Thanks

jeffdefacto commented 6 years ago

Hey @adissadis its an easy fix luckily.

open osm-tasking-manager2/osmtm/views/osmauth.py

find this line USER_DETAILS_URL = 'http://api.openstreetmap.org/api/0.6/user/details'

and replace it with USER_DETAILS_URL = 'https://api.openstreetmap.org/api/0.6/user/details'

ethan-nelson commented 6 years ago

I suspected it would be related to that. Thanks for the follow up--I'll file a pull request to fix this!

adisadit commented 6 years ago

@jeffdefacto woow it really work. Thanks a lot for your hint to fix this problem.. 😄

answerquest commented 6 years ago

Oh my god, it was this?? Ok, does anyone know who's managing the India Tasking Manager instance? http://tasks.openstreetmap.in Same issue there, and no details for contacting.