Unable to fetch new access token using performTokenRequest API
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
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
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