-
Notifications
You must be signed in to change notification settings - Fork 568
add oauth authentication support #867
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
Conversation
The current implementation has been tested and works on Android, iOS, and macOS. I currently don't have access to a Windows machine, so it's not yet tested on that platform. OAuth2 authentication works across supported platforms. However, it requires a platform-specific setup to handle custom scheme redirects. The app must register a custom scheme named A pending enhancement for OAuth2 is to support As for OAuth1, this implementation does not handle the complete OAuth1 flow. It assumes that the necessary steps to obtain the access token have already been performed manually or through a backend service. This approach aligns with the behavior in other API clients such as Postman and Insomnia, where users provide the access tokens directly to make authenticated requests. |
I’ve documented the different OAuth 2.0 redirect URI handling approaches (custom scheme, localhost loopback, HTTPS server callbacks, manual paste) and how they apply to our API client. Detailed notes: OAuth2 Redirect URI Handling — Gist |
… the EnvAuthField widget to rebuild and the cursor position to reset
Screen.Recording.2025-08-07.at.10.22.57.PM.movWith ListView and No Scroll Physics Screen.Recording.2025-08-07.at.10.23.26.PM.movWith ListView and ClampingScrollPhysics Unexpected Scroll behaviour |
@DenserMeerkat Can you please review this PR and add your feedback. |
The The |
PR Description
This PR adds support for both OAuth1 and OAuth2 authentication.
Supported OAuth2 Grant types:
OAuth1(working)
To Test OAuth1 and OAuth2
OAuth1:
https://postman-echo.com/oauth1
RKCGzna7bv9YD57c
D+EdQ-gs$-%@2Nu7
OAuth2:
Github OAuth Api
(or)
mock-oauth2-server this repository has a mock-oauth2-server which can run locally.
docker pull ghcr.io/navikt/mock-oauth2-server:2.2.1
docker run --rm -p 8080:8080 ghcr.io/navikt/mock-oauth2-server:2.2.1
All links required for oauth2 will be available at:
http://localhost:8080/{username}/.well-known/openid-configuration
OAuth2 Client Debugger:
http://localhost:8080/{username}/debugger
Related Issues
Checklist
main
branch before making this PRflutter upgrade
and verify)flutter test
) and all tests are passingAdded/updated tests?
OS on which you have developed and tested the feature?