OsmApiClient icon indicating copy to clipboard operation
OsmApiClient copied to clipboard

Allow using OAuth 2

Open HarelM opened this issue 4 years ago • 4 comments

Seems like OAuth 2 should be supported soon in OSM and it's worth adding it to this library once it is landed. See the following issue; https://github.com/openstreetmap/openstreetmap-website/issues/1408 This is more of a place holder for now...

HarelM avatar Apr 20 '21 09:04 HarelM

I saw the other ticket get closed. Does that mean this ticket is ready? I don't have enough experience with OAuth to feel comfortable implementing this myself. Do you have time/energy to take this on?

blackboxlogic avatar Jun 24 '21 20:06 blackboxlogic

Sure, I saw the ticket getting closed too. I'll look into it. I might consider removing oath1 support if this works good to avoid maintenance of both protocols in the code... It might take me a few days to get into it though...

HarelM avatar Jun 24 '21 20:06 HarelM

Since OAuth v1 was implemented in a single class, I'm hopeful that v2 could be implemented without removing v1 if there's a possibility that v1 may still be useful.

blackboxlogic avatar Jun 24 '21 20:06 blackboxlogic

I'll see what I can do. In theory whoever would like to use OAuth 1 can simply take an older NuGet package that is not the latest (when this is shipped). One of the motivation besides maintenance is to reduce dependency on another package that can also go stale... In any case, I need to investigate how to do it and then we can further discuss this...

HarelM avatar Jun 24 '21 20:06 HarelM

I think I'll be needing both oauth 1 and 2 at the same time to allow easier migration to customers, so I think I'll keep 1.0 around. Also since I'm using docker I don't care any more about dependencies much, as the docker image either has them inside or not, and the upgrade process is super easy. Bottom line, I'll keep them both for now. Commit with the (super simple) implementation will be here in a minute.

HarelM avatar Nov 27 '22 20:11 HarelM