openid / openid/AppAuth-iOS

invalid_client error upon code/token exchange

Open
#276 5 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 am writing a Xamarin-iOS app that requires authentication using OpenID against an identityserver3.

Using AppAuth I can successfully obtain an authorization code. Upon attempting to exchange the code with the identity server I get an invalid_client error.

How is this possible if the code was granted without the error?

Update:

I was able to get this to work by intercepting the authorization code mid SFFlowSession and then exchanging it for a token with an added parameter for client_secret. This violates best practices on storing client_secrets locally but it's the only solution i've found.

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 AppAuth's authorization-code and token-exchange path, including the SFFlowSession interception described in the issue, and compare its client authentication request with IdentityServer3's requirements. Done means reproducing the invalid_client response and documenting a supported exchange path that does not require storing a client secret in the app.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
authentication, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.