MaikuB / MaikuB/flutter_appauth
token_failed, Failed to get token
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 308
- Forks
- 301
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 5
Description
I'm getting the following error after 3 attempts of a successful token refresh method calls in the 4th attempt I'm getting the following error:
`PlatformException(token_failed, Failed to get token: invalid_grant: The refresh token is invalid or expired., null, null)
`
I'm using OKTA for OAuth.
This is my method:
```
final oktaRefresh = await appAuth.token(TokenRequest(
'${Repository.env!['OKTACLIENTID']}',
'${Repository.env!['OKTAREDIRECTURL']}',
discoveryUrl:
'https://${Repository.env!['OKTADOMAIN']}/oauth2/${Repository.env!['OKTAUTHORIZER']}/.well-known/openid-configuration',
refreshToken: refreshToken,
grantType: "refresh_token",
scopes: ["openid", "profile", "offline_access"]));
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named; start by reproducing the fourth refresh call from the shown Dart TokenRequest and inspect the refresh-token response/error from the Flutter AppAuth wrapper. Done means identifying the cause of the invalid_grant failure and documenting or fixing the relevant behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, dart, flutter, ios
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100