Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canceling Apple ID isn't handled #700

Open
5 of 20 tasks
richardpineo opened this issue Jun 9, 2022 · 0 comments
Open
5 of 20 tasks

Canceling Apple ID isn't handled #700

richardpineo opened this issue Jun 9, 2022 · 0 comments

Comments

@richardpineo
Copy link

Description:

This one is a little difficult to explain, so bear with me.

We use Azure B2C to handle authentication and OAuthSwift to handle that communication. Everything works great and has for quite some time.

Recently, we updated our B2C configuration to use Apple ID for some customers. However, instead of redirecting to a web site that allows the user to enter username/password, iOS brings up a specialized / native Apple ID view. This works great if the user successfully authenticates.

However, if the user cancels out of that process, then OAuthSwift never gets the memo and will basically hang forever since it never got a notification that the Auth flow was canceled.

I spent a long time trying to hook the Apple ID cancel message, but couldn't figure out how to do it. You can detect that the scene has resigned active but that isn't enough information to meaningfully act upon because other actions (like an incoming phone call or more importantly FaceID to access stored passwords) will also generate that scenario.

This issue is described in this stackoverflow:
https://stackoverflow.com/questions/70130072/cannot-detect-if-user-pressed-cancel-button-on-wkwebview-sign-in-with-apple-pop

I have no idea what to try next - it seems to me that OAuthSwift should be able to detect the user cancelling out of the Apple ID auth just like it does when the user cancel's out of any IDP shown in the browser window.

This is what the native Apple ID screen looks like on an iPad:
image

OAuth Provider? (Twitter, Github, ..):

Azure / Apple ID

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

  • iOS :
  • OSX :
  • TVOS :
  • WatchOS :

Installation method:

  • Carthage
  • CocoaPods
  • Swift Package Manager
  • Manually

Library version:

  • head
  • v2.1.0
  • v2.0.0
  • v1.4.1
  • other: (v2.2.0)

Xcode version:

  • 11.4 (Swift 5.2)
  • 11.x (Swift 5.1)
  • 10.x (Swift 5.0)
  • other: (13.4.1)
  • objective c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant