Post

Replies

Boosts

Views

Activity

ASWebAuthenticationSession
Hi all; I am working with an app, which implements the authentication mechanisms based on ASWebAuthenticationSession. However, due to the demands of the app, I need to extract or interact with the cookies that may be generated. Is it possible to extract and parse cookies using this framework? If yes, what would be the most appropriate mechanism for such? Many thanks.
Topic: Safari & Web SubTopic: General Tags:
0
0
741
Apr ’22
ASWebAuthenticationSession MacOS implementation
Hi all; I'm trying to implement ASWebAuthenticationSession on MacOS. The application must be able to open the default browser to interact with the IdP. The implemented code is basic, since what I am trying to understand is how to configure the framework to be able to open the system browser. Based on the documentation I observe this: A browser loads and displays the page, from which the user can authenticate. In iOS, the browser is a secure, embedded web view. In macOS, the system opens the user’s default browser if it supports web authentication sessions, or Safari otherwise. That is, it implies that this would be valid only for iOS, since a view is required where the content can be anchored. With which my understanding is that for MacOS that is not necessary, since the system browser is used. However, when I try to compile the base example, Xcode throws the following message: _Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=2 "Cannot start ASWebAuthenticationSession without providing presentation context. The base code I'm using is very simple: ASWebAuthenticationSession* webAuth = [[ASWebAuthenticationSession alloc] initWithURL:requestURL                 callbackURLScheme:redirectScheme                 completionHandler:^(NSURL * _Nullable callbackURL,NSError * _Nullable error)   {}]; webAuth.start; All of this is required in Objective-C. All the examples that have been and will be are for iOS and all based on Swift. Any reference about it to be able to implement this in MacOs? Thanks and regards. Cristian.
2
0
2.4k
Apr ’22
ASWebAuthenticationSession
Hi all; I am working with an app, which implements the authentication mechanisms based on ASWebAuthenticationSession. However, due to the demands of the app, I need to extract or interact with the cookies that may be generated. Is it possible to extract and parse cookies using this framework? If yes, what would be the most appropriate mechanism for such? Many thanks.
Topic: Safari & Web SubTopic: General Tags:
Replies
0
Boosts
0
Views
741
Activity
Apr ’22
ASWebAuthenticationSession MacOS implementation
Hi all; I'm trying to implement ASWebAuthenticationSession on MacOS. The application must be able to open the default browser to interact with the IdP. The implemented code is basic, since what I am trying to understand is how to configure the framework to be able to open the system browser. Based on the documentation I observe this: A browser loads and displays the page, from which the user can authenticate. In iOS, the browser is a secure, embedded web view. In macOS, the system opens the user’s default browser if it supports web authentication sessions, or Safari otherwise. That is, it implies that this would be valid only for iOS, since a view is required where the content can be anchored. With which my understanding is that for MacOS that is not necessary, since the system browser is used. However, when I try to compile the base example, Xcode throws the following message: _Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=2 "Cannot start ASWebAuthenticationSession without providing presentation context. The base code I'm using is very simple: ASWebAuthenticationSession* webAuth = [[ASWebAuthenticationSession alloc] initWithURL:requestURL                 callbackURLScheme:redirectScheme                 completionHandler:^(NSURL * _Nullable callbackURL,NSError * _Nullable error)   {}]; webAuth.start; All of this is required in Objective-C. All the examples that have been and will be are for iOS and all based on Swift. Any reference about it to be able to implement this in MacOs? Thanks and regards. Cristian.
Replies
2
Boosts
0
Views
2.4k
Activity
Apr ’22