Forums

Pop up authorize location

I'm trying to lauch a flask website with pythonanywhere, but I use the google API, so users have to authorize the use of the location. However, when i get into the website, the pop up does not appear to request authorization. I hosted the same code in Heroku and it is working, but I want to implement with you guys to use sqlite.

Check your error and server logs, as well as your browser developer tools to see if your getting error reports that you can use to start debugging.

There is no errors, the only problem is that the users are not getting a pop up to authorize the use of location on the browser. I tried on different devices and was the same, they have to manually authorize, and this is not happening on heroku.

If the popup is not showing, then either the code to make it open is not being called for some reason, or there is an error somewhere. Are you sure you checked everywhere? This includes the browser console when you expect the popup to show and the web app error and server logs. If there are no errors, then use the browser tools (I'm assuming there must be browser code to open the popup) to ensure that the code to open the popup is being called.

I just realized the problem, the geolocation works just with https, with http they dont allow the use of the user’s location.

Thanks,

That makes sense, I guess it's a good thing to avoid sending potentially-private information like that over an unencrypted link. Thanks for letting us know!