Implement OAuth 2.0 authentication
Tell us about the task you want to perform and are unable to do so because the feature is not available
I want to send requests to services that use OAuth 2.0. Right now I have to manually acquire an authorization token and copy/paste it into APIDash. The tokens expire usually in an hour, so I have to do this multiple times a day, not only separately for every service, but even for every individual request I have in the library.
Describe the solution/feature you'd like us to add
APIDash should automatically open a browser session/popup and let me sign in using OAuth 2.0's "hybrid", "implicit" flows. It should also allow me to obtain a token using the "client credentials" flow, which doesn't require a browser session (this is way easier to implement and would already be a huge step forward).
Thanks for opening this issue @paulius-valiunas Tagged it as a good first issue so that contributors can also take a look into it and send across a PR
Can you please assign this to me
@beingPro007 We do not assign any issues. Anyone can work on the issue and submit a PR.
@ashitaprasad @paulius-valiunas Hi, I am Abhinav. I was working on this issue for the past 3-4 days. Currently, I have implemented the core functionalities of the OAuth2 feature. I am attaching the images of the UI and the flow. Please help me by providing iterations to make it better.
OAuth2 Feature Implementation
Current State
- OAuth2 Package: Utilizes the official Dart OAuth2 package.
- OAuth Provider: Implemented using GitHub as the OAuth provider for illustration purposes.
- Flow Type: Currently, only the Authorization Code flow type is implemented.
Images and Flow
@abhinavs1920 You can send across a PR for review
@ashitaprasad Please check #524
Are there any plans on aligning with the OAuth 2.1 standards? It mainly simplifies OAuth 2.0 by removing the password grant and rotating refresh tokens