Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to api.openstreetmap.org API host #8

Closed
wants to merge 2 commits into from

Conversation

danieldegroot2
Copy link

Use api.openstreetmap.org/api/ -and HTTPS- instead of www.openstreetmap.org/api/*.

(Is: openstreetmap/operations#951)

@HarelM
Copy link
Collaborator

HarelM commented Nov 3, 2023

Thanks! Will oauth2 work? I see some comments there which I didn't understand...

@danieldegroot2
Copy link
Author

I avoided changing the ones in AuthClient.cs, NonAuthClient.cs and anything else in other files.

I think NonAuthClient.cs is complementary to ClientsFactory.cs in that it does API calls without authentication.
In that case it can also be changed to the api. URL. Let me know if this is correct.


As for the other two, note api.openstreetmap.org API url currently can not do OAuth 2 handshake. See openstreetmap/operations#951 (comment)
You can split the www. base URL and api. API url. See osmlab/osm-auth#123 (comment)

See also osmlab/osm-auth#123 (comment) for another solution.

@HarelM
Copy link
Collaborator

HarelM commented Nov 4, 2023

Does the www end point still works?
If this is the case, I prefer to keep the current address until everything is solved and then migrate... Makes more sense to me, but I might be wrong.
@blackboxlogic what do you think?

@danieldegroot2
Copy link
Author

Does the www end point still works?

There have been no changes to the functionality, so yes.

@blackboxlogic
Copy link
Collaborator

blackboxlogic commented Nov 5, 2023

@HarelM @danieldegroot2

Pro: longer timeouts
Con: Oauth2 breaks with work-arounds
Am I understanding that right?

Feel free to change all the documentation/comments, including in AuthClient.cs and NonAuthClient.cs to nudge users in the right direction. But updating PRODUCTION_URL is a breaking change I wouldn't surprise on users.

Maybe we should deprecate PRODUCTION_URL with a lengthy comment mentioning timeouts, Oath2, and the updated URL. Or, if there are plans to resolve the Oauth2 issue (are there?), then let's just wait for that to be resolved.

@danieldegroot2
Copy link
Author

Pro: longer timeouts

Yes, though they are subject to change.

Con: Oauth2 breaks with work-arounds

Yes, without workarounds it would break, so to be safe you should use a workaround.

plans to resolve the Oauth2 issue

No timeline has been announced, so no.

then let's just wait for that to be resolved.

I will close this PR in favour of #9 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants