-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: prompt login not supported #27743
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
Closed
Closed
Changes from 8 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2a680d4
fix: support webcredentials
ieow a6372e1
fix: prompt login not supported
ieow d813476
fix: remove unused variable
ieow b0bfa56
fix: support ios google login for 17.4 with ios schema
ieow db12727
fix: update tests, update to warning
ieow 05d49bd
fix: cursor comment
ieow a599651
fix: update cursor comment
ieow 8742310
refactor: revert not needed codes
ieow 1b601a0
fix: make prompt not interactable ( close when touch outside)
ieow ad6f638
fix: update tests
ieow 0ec8d32
chore: yarm format
ieow fb198f2
fix: update tests
ieow 6e4622b
fix: tests typing
ieow d93fb7b
feat: revert the gid
ieow b61251e
feat: add feature flag
ieow 9e697be
Merge branch 'cw/webcredentials' into cw/prompt-login-not-supported
ieow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
.yarn/patches/expo-web-browser-npm-14.0.2-98d00ce880.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| diff --git a/ios/WebAuthSession.swift b/ios/WebAuthSession.swift | ||
| index 0d8101b01d7c6cd803acf6a359ceaa026993bdd0..c1beeabd962e561bf48392d58c084272247a95cc 100644 | ||
| --- a/ios/WebAuthSession.swift | ||
| +++ b/ios/WebAuthSession.swift | ||
| @@ -20,17 +20,34 @@ final internal class WebAuthSession { | ||
| private var presentationContextProvider = PresentationContextProvider() | ||
|
|
||
| init(authUrl: URL, redirectUrl: URL?, options: AuthSessionOptions) { | ||
| - self.authSession = ASWebAuthenticationSession( | ||
| - url: authUrl, | ||
| - callbackURLScheme: redirectUrl?.scheme, | ||
| - completionHandler: { callbackUrl, error in | ||
| - self.finish(with: [ | ||
| - "type": callbackUrl != nil ? "success" : "cancel", | ||
| - "url": callbackUrl?.absoluteString, | ||
| - "error": error?.localizedDescription | ||
| - ]) | ||
| - } | ||
| - ) | ||
| + let completionHandler: (URL?, Error?) -> Void = { callbackUrl, error in | ||
| + self.finish(with: [ | ||
| + "type": callbackUrl != nil ? "success" : "cancel", | ||
| + "url": callbackUrl?.absoluteString, | ||
| + "error": error?.localizedDescription | ||
| + ]) | ||
| + } | ||
| + | ||
| + // iOS 17.4+/macOS 14.4+ supports HTTPS callbacks with host/path matching | ||
| + if #available(iOS 17.4, macOS 14.4, *), | ||
| + let redirectUrl, | ||
| + redirectUrl.scheme?.lowercased() == "https", | ||
| + let host = redirectUrl.host(percentEncoded: false), | ||
| + !host.isEmpty { | ||
| + let rawPath = redirectUrl.path | ||
| + let path = (rawPath.isEmpty || rawPath == "/") ? "" : rawPath | ||
| + self.authSession = ASWebAuthenticationSession( | ||
| + url: authUrl, | ||
| + callback: .https(host: host, path: path), | ||
| + completionHandler: completionHandler | ||
| + ) | ||
| + } else { | ||
| + self.authSession = ASWebAuthenticationSession( | ||
| + url: authUrl, | ||
| + callbackURLScheme: redirectUrl?.scheme, | ||
| + completionHandler: completionHandler | ||
| + ) | ||
| + } | ||
| self.authSession?.prefersEphemeralWebBrowserSession = options.preferEphemeralSession | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.