openid / openid/AppAuth-iOS

access token refresh with refresh token

Open
#349 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Objective-C
Stars
2k
Forks
867
Avg merge
4d 48m
Merged PRs (30d)
1

Description

I try to refresh an expired access token using the "performActionWithFreshTokens" method in OIDAuthState.
I currently use 1.0.0 beta version of AppAuth. I have the same issue on 0.0.95 version too.

When I called the method, I get the following response from Keycloak server.
{
"error": "invalid_grant",
"error_description": "Refresh token expired"
}

But the problem is that the completion handler is not getting called for "dataTaskWithRequest" method in OIDAuthorizationService. (Line:292 )
NSURLSession *session = [OIDURLSessionProvider session];
[[session dataTaskWithRequest:URLRequest
completionHandler:^(NSData *_Nullable data,
NSURLResponse *_Nullable response,
NSError *_Nullable error) {

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 with OIDAuthState's performActionWithFreshTokens path and OIDAuthorizationService around the dataTaskWithRequest completion handler at line 292. Reproduce an expired refresh-token response from Keycloak and trace whether the invalid_grant response reaches the handler; done means the failure is surfaced through the expected completion path.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
authentication, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.