Skip to content

Commit

Permalink
Set window scene identifier for iOS WebAuthn requests
Browse files Browse the repository at this point in the history
rdar://106483264

Reviewed by Aditya Keerthi.

Start setting the window scene identifier for WebAuthn requests.

* Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:

Canonical link: https://commits.webkit.org/263182@main
  • Loading branch information
Garrett Davidson authored and pxlcoder committed Apr 20, 2023
1 parent 38a12fe commit ee7418d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Expand Up @@ -275,6 +275,10 @@ typedef NS_ENUM(NSInteger, ASCredentialRequestStyle) {
@property (nonatomic) ASCredentialRequestStyle requestStyle;

@property (nonatomic, nullable, copy) ASGlobalFrameIdentifier *globalFrameID;

#if TARGET_OS_IOS
@property (nonatomic, copy) NSString *windowSceneIdentifier;
#endif
@end

@protocol ASCCredentialProtocol <NSObject, NSSecureCoding>
Expand Down
Expand Up @@ -30,6 +30,7 @@

#import "LocalService.h"
#import "Logging.h"
#import "PageClient.h"
#import "WKError.h"
#import "WebAuthenticationRequestData.h"
#import "WebPageProxy.h"
Expand Down Expand Up @@ -500,6 +501,8 @@ static inline void continueAfterRequest(RetainPtr<id <ASCCredentialProtocol>> cr
}
#endif // PLATFORM(MAC) || PLATFORM(MACCATALYST)
#if PLATFORM(IOS)
requestContext.get().windowSceneIdentifier = m_webPageProxy.pageClient().sceneID();

[m_proxy performAuthorizationRequestsForContext:requestContext.get() withCompletionHandler:makeBlockPtr([weakThis = WeakPtr { *this }, handler = WTFMove(handler)](id<ASCCredentialProtocol> credential, NSError *error) mutable {
callOnMainRunLoop([weakThis, handler = WTFMove(handler), credential = retainPtr(credential), error = retainPtr(error)] () mutable {
#elif PLATFORM(MAC)
Expand Down

0 comments on commit ee7418d

Please sign in to comment.