Skip to content

Added Basic Authentication feature #687

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

Closed

Conversation

pratapsingh9
Copy link
Contributor

@pratapsingh9 pratapsingh9 commented Mar 21, 2025

PR Description

This PR adds support for Basic Authentication by introducing username and password fields for both GraphQL and REST APIs in the API Dash repo. I’ve also added a new authorization tab to make it easier to configure auth credentials.

Summary of Changes

  • Added a new TabBar widget for managing API authorization.
  • Created a provider for auth credentials to handle state efficiently.
  • Implemented methods to:
    • Update authentication type (None, Basic Auth, etc.).
    • Update username and password credentials dynamically.
    • Generate authentication headers and apply them to API requests.
  • Made sure everything works smoothly for both GraphQL and REST APIs.

Related Issues

Screenshots

image
image
image
image

Checklist

  • I have gone through the contributing guide
  • I have updated my branch and synced it with project main branch before making this PR
  • I am using the latest Flutter stable branch (run flutter upgrade and verify)
  • I have run the tests (flutter test) and all tests are passing

Added/updated tests?

We encourage you to add relevant test cases.

  • Yes
  • No, and this is why: please replace this line with details on why tests have not been included

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

@ashitaprasad
Copy link
Member

There is no separation of UI & logic.
If headers, params, body, everyone uses the same provider why have you created a separate provider for handling Auth.

@pratapsingh9 pratapsingh9 deleted the add-feature-Basicauthentication branch March 24, 2025 19:28
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.

Add API Auth: Basic authentication
2 participants