openid / openid/AppAuth-iOS

OIDEndSessionRequest initializers lack correct nullability specifiers

Open
#565 0 comments 3 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

Are you filing an issue about iOS 12?
No

Describe the bug
OIDEndSessionRequest.h brackets its declarations with NS_ASSUME_NONNULL, which means that all object-typed parameters will be bridged into Swift as non-optional, unless otherwise specified.

The initializers to create an OIDEndSessionRequest allow you to pass in an idTokenHint:(NSString *)idTokenHint parameter, which lacks the nullable specifier. This means that in Swift, that parameter is bridged as String, and not String?.

The @property for this parameter correctly shows it as nullable, and the implementation allows for the underlying ivar to be nil, which means the initializer parameter should allow nil values as well.

The same applies to the postLogoutRedirectURL:(NSURL *)postLogoutRedirectURL and state:(NSString *)state parameters.

Expected behavior
These initializer parameters are declared as (nullable NS... *):

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 in OIDEndSessionRequest.h and inspect the initializers alongside the nullable idTokenHint, postLogoutRedirectURL, and state properties. Confirm the three initializer parameters accept nil values and are imported into Swift as optional types; the issue is done when their nullability matches the properties and implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
authentication, mobile-dev
Issue type
Bug
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.