Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

OAuth2.0 Implementation #42

Closed
wants to merge 3 commits into from
Closed

Conversation

HelNershingThapa
Copy link

This PR adds changes to implement the OAuth2.0 authorization framework.

Summary of changes made:

  • Removed functions that helped to generate signatures. timenonce(), getAuth(), etc. that were used to generate signatures have been removed since they are no longer required. OAuth 2 relies on HTTPS for security, we don't have to "sign" requests anymore.
  • Added authorization data to request headers.

@bhousel
Copy link
Member

bhousel commented Apr 26, 2022

This is pretty great @HelNershingThapa -
Because OAuth2 is much simpler - relying on bearer tokens and SSL for security - it means that almost nothing remains in this library after the proposed change.

So I think what I'm going to do is:

  • just keep this ohauth library as a "most-of-the-way OAuth 1.0 client implementation in Javascript".
    It will become less relevant over time and that's ok.
  • but move the few remaining things (xhr, header generation) back over to the https://github.com/osmlab/osm-auth library, which will be focused on OAuth2 going forward.

@bhousel bhousel closed this Apr 26, 2022
@HelNershingThapa
Copy link
Author

That sounds great. I'll be looking forward to the new release of the osm-auth library. Thanks for the review @bhousel

@Ichchhie
Copy link

Thank you @bhousel and @HelNershingThapa for the collaboration. This looks exciting. Really looking forward to the new release of the osm-auth too :)

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

Successfully merging this pull request may close these issues.

None yet

3 participants