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

Implement OAuth 2.0 authentication #481

Open
paulius-valiunas opened this issue Oct 14, 2024 · 6 comments
Open

Implement OAuth 2.0 authentication #481

paulius-valiunas opened this issue Oct 14, 2024 · 6 comments
Labels
enhancement New feature or request FOSSHack2025 good first issue Good for newcomers

Comments

@paulius-valiunas
Copy link

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).

@paulius-valiunas paulius-valiunas added the enhancement New feature or request label Oct 14, 2024
@ashitaprasad ashitaprasad added the good first issue Good for newcomers label Oct 15, 2024
@ashitaprasad
Copy link
Member

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

@beingPro007
Copy link

Can you please assign this to me

@ashitaprasad
Copy link
Member

@beingPro007 We do not assign any issues. Anyone can work on the issue and submit a PR.

@abhinavs1920
Copy link

abhinavs1920 commented Dec 28, 2024

@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

  1. OAuth2 Package: Utilizes the official Dart OAuth2 package.
  2. OAuth Provider: Implemented using GitHub as the OAuth provider for illustration purposes.
  3. Flow Type: Currently, only the Authorization Code flow type is implemented.

Images and Flow

Screenshot 2024-12-28 171731

Screenshot 2024-12-28 171752

Screenshot 2024-12-29 002517

Screenshot 2024-12-29 002535

Screenshot 2024-12-29 003243

Screenshot 2024-12-29 002634

@ashitaprasad
Copy link
Member

@abhinavs1920 You can send across a PR for review

@abhinavs1920 abhinavs1920 mentioned this issue Jan 5, 2025
9 tasks
@abhinavs1920
Copy link

@ashitaprasad Please check #524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request FOSSHack2025 good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@ashitaprasad @paulius-valiunas @abhinavs1920 @beingPro007 and others