MaikuB / MaikuB/flutter_appauth

problem conflict with go_router

Open
#619 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C
Stars
308
Forks
301
Avg merge
2d 11h
Merged PRs (30d)
5

Description

i have a problem making a login inside a gorouter

the login is succesful, but it always redirect to gorouter and send this callback data

Received Keycloak callback URI: com.company.ridms://callback/?state=ugMVsKXHDBKYUX6BukeZ0Q&session_state=b102af9a-d102-4f8b-9c51-3af2df1722d9&iss=https%3A%2F%2Fauth.api.company.com%2Frealms%2FRIDMS&code=cf23524c-1f25-4e46-98a7-df72b5cc6e84.b102af9a-d102-4f8b-9c51-3af2df1722d9.88be5da0-dd23-4ea0-8854-721c0028ad5c

and then the try catch method return AppAuth Error Log : PlatformException(null_intent, Failed to authorize: Null intent received, , null)
and this is my code

try{ final AuthorizationTokenResponse result = await appAuth.authorizeAndExchangeCode( AuthorizationTokenRequest( clientID!, k_redirect, discoveryUrl: appauth_discovery, clientSecret: secret, scopes: scopesList, ), ); if (result != null) { if (kDebugMode) { print("appauth result ${result.accessToken}"); } } }catch(e){ if (kDebugMode) { print("AppAuth Error Log : $e"); } return false; }

is there some step that i miss? any help would be appreciated thx

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the shown AuthorizationTokenRequest and the callback handoff involving go_router, AppAuth, and the Keycloak redirect URI. Compare the callback configuration with the Android app setup; done means the callback is accepted without null_intent and authorization returns a token.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
authentication, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.