mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-27 05:05:51 +03:00
[GH-ISSUE #700] Canceling Apple ID isn't handled #453
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#453
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @richardpineo on GitHub (Jun 9, 2022).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/700
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:

OAuth Provider? (Twitter, Github, ..):
Azure / Apple ID
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version: