openid / openid/AppAuth-iOS

‘Nonce’ value is changing and displaying in HEADER rather than PAYLOAD data in token verification

Open
#672 0 comments 0 reactions 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 all,

I am implementing the Appauth (OIDC login) in our iOS app and following the same repo methods described below. I am passing the ‘Nonce’ value from our end and displayed the same nonce in generated request also but nonce is changing between the request and the response as well displaying it in the HEADER section

Below OIDAuthorizationRequest method I am using to generate the JWT token.

Request:


let request = OIDAuthorizationRequest(configuration: configuration,
clientId: self.clientID,
clientSecret: nil,
scope: OIDScopeOpenID,
redirectURL: URL(string: self.kRedirectUri)!,
responseType: OIDResponseTypeCode,
state: state,
nonce: nonce,
codeVerifier: codeverifier,
codeChallenge: codeChallenge,
codeChallengeMethod: OIDOAuthorizationRequestCodeChallengeMethodS256,
additionalParameters: nil)

I am getting the JWT token in the success handler and validating it on https://jwt.io/ and found the issue as above (‘Nonce’ is replaced and displayed in HEADER rather than PAYLOAD data). I have posted the Ref. image for a better understanding. Any help will be appreciated, thank you in advance.

Screenshot 2021-12-20 at 7 43 50 PM

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 OIDAuthorizationRequest construction shown in the issue and the success handler that receives the JWT. Compare the request nonce with the returned token claims and check the identity provider's OIDC behavior; done means determining whether AppAuth-iOS or the provider is responsible and documenting a reproducible resolution.

Written by the indexing model from the issue text.

Assessment

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