openid / openid/AppAuth-iOS

Unable to fetch new access token using performTokenRequest API

Open
#634 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi Team,
We are exploring the AppAuth iOS library for our app, Followed the sample app shared for iOS.

We have our own eternal IDM server configuration and able to get the auth token and the access token as well for the first time, but when we try to use the below API to refresh the new tokens

  • (void)performTokenRequest:(OIDTokenRequest *)request callback:(OIDTokenCallback)callback;

we are getting the below error always on subsequent above API usage
Error Domain=org.openid.appauth.oauth_token Code=-10 "invalid_grant: Authorization code is invalid or expired." UserInfo={OIDOAuthErrorResponseErrorKey={
}, NSLocalizedDescription=invalid_grant: Authorization code is invalid or expired., NSUnderlyingError=0x28391eaf0 {Error Domain=org.openid.appauth.remote-http Code=400 "{"error_description":"Authorization code is invalid or expired.","error":"invalid_grant"}" UserInfo={NSLocalizedDescription={"error_description":"Authorization code is invalid or expired.","error":"invalid_grant"}}}}

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 the performTokenRequest:callback: API and the OIDTokenRequest construction used after the initial authorization, then compare it with the sample app's token flow. Check the provider configuration and returned token data to determine why a later request is treated as an expired authorization code. Done means subsequent token requests obtain a new access token without invalid_grant.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
authentication, mobile-dev
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.