openid / openid/AppAuth-iOS

Trailing slash in URL breaks the auth flow

Open
#446 3 comments 5 reactions 0 assignees View on GitHub

@AlexPlekhov is already working on this.

Since Jun 10, 2022.

  • #710 by @AlexPlekhov — open
Dominant language
Objective-C
Stars
2k
Forks
867
Avg merge
4d 48m
Merged PRs (30d)
1

Description

Describe the bug
We are using a third party OpenID provider that appends a slash to the redirect URL, e.g. scheme://my-domain.com/?code=... (note the trailing slash after my-domain.com). When this URL is opened by the browser, the user is taken back to the app but the auth flow gets stuck. Neither a result nor an error is produced. When the same URL without the trailing slash is opened, everything works fine. We are using AppAuth iOS Version 1.1.

Expected behavior
The AppAuth Android library handles this correctly and is ables to extract the authorization code from the URL, which i think should be the expected behavior.

Smartphone (please complete the following information):

  • Device: iPhone 8
  • OS: iOS 12.4
  • Browser: stock browser

Additional context
We are using a thin wrapper around app auth for flutter (https://github.com/MaikuB/flutter_appauth) which should have no effect on the library's function.

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

The issue names no source file or test entry point. Reproduce the authorization flow with a redirect URL containing a trailing slash, then trace the iOS URL handling and add coverage showing that the authorization code is extracted and the flow completes without the slash-specific failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
authentication, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.