Skip to content

Commit aa8e3b3

Browse files
authored
Merge pull request #224818 from henrymbuguakiarie/msid-2023-freshness-quickstart-v2-python-webapp
updating meta data
2 parents ca2fb47 + 58d0c73 commit aa8e3b3

File tree

2 files changed

+32
-29
lines changed

2 files changed

+32
-29
lines changed

articles/active-directory/develop/customize-webviews.md

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,52 @@ manager: CelesteDG
77

88
ms.service: active-directory
99
ms.subservice: develop
10-
ms.topic: how-to
10+
ms.topic: conceptual
1111
ms.workload: identity
12-
ms.date: 08/28/2019
12+
ms.date: 01/24/2023
1313
ms.author: henrymbugua
1414
ms.reviewer: oldalton
1515
ms.custom: aaddev, has-adal-ref
1616
---
1717

1818
# Customize browsers and WebViews for iOS/macOS
1919

20-
A web browser is required for interactive authentication. On iOS and macOS 10.15+, the Microsoft Authentication Library (MSAL) uses the system web browser by default (which might appear on top of your app) to do interactive authentication to sign in users. Using the system browser has the advantage of sharing the Single Sign On (SSO) state with other applications and with web applications.
20+
A web browser is required for interactive authentication. On iOS and macOS 10.15+, the Microsoft Authentication Library (MSAL) uses the system web browser by default (which might appear on top of your app) to do interactive authentication to sign in users. Using the system browser has the advantage of sharing the single sign-on (SSO) state with other applications and with web applications.
2121

2222
You can change the experience by customizing the configuration to other options for displaying web content, such as:
2323

2424
For iOS only:
2525

26-
- [SFAuthenticationSession](https://developer.apple.com/documentation/safariservices/sfauthenticationsession?language=objc)
26+
- [SFAuthenticationSession](https://developer.apple.com/documentation/safariservices/sfauthenticationsession?language=objc)
2727
- [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller?language=objc)
2828

2929
For iOS and macOS:
3030

3131
- [ASWebAuthenticationSession](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession?language=objc)
3232
- [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview?language=objc).
3333

34-
MSAL for macOS only supports `WKWebView` on older OS versions. `ASWebAuthenticationSession` is only supported on macOS 10.15 and above.
34+
MSAL for macOS only supports `WKWebView` on older OS versions. `ASWebAuthenticationSession` is only supported on macOS 10.15 and above.
3535

3636
## System browsers
3737

3838
For iOS, `ASWebAuthenticationSession`, `SFAuthenticationSession`, and `SFSafariViewController` are considered system browsers. For macOS, only `ASWebAuthenticationSession` is available. In general, system browsers share cookies and other website data with the Safari browser application.
3939

40-
By default, MSAL will dynamically detect iOS version and select the recommended system browser available on that version. On iOS 12+ it will be `ASWebAuthenticationSession`.
40+
By default, MSAL will dynamically detect iOS version and select the recommended system browser available on that version. On iOS 12+ it will be `ASWebAuthenticationSession`.
4141

4242
### Default configuration for iOS
4343

44-
| Version | Web browser |
45-
|:-------------:|:-------------:|
44+
| Version | Web browser |
45+
| :-----: | :------------------------: |
4646
| iOS 12+ | ASWebAuthenticationSession |
47-
| iOS 11 | SFAuthenticationSession |
48-
| iOS 10 | SFSafariViewController |
47+
| iOS 11 | SFAuthenticationSession |
48+
| iOS 10 | SFSafariViewController |
4949

5050
### Default configuration for macOS
5151

52-
| Version | Web browser |
53-
|:-------------:|:-------------:|
54-
| macOS 10.15+ | ASWebAuthenticationSession |
55-
| other versions | WKWebView |
52+
| Version | Web browser |
53+
| :------------: | :------------------------: |
54+
| macOS 10.15+ | ASWebAuthenticationSession |
55+
| other versions | WKWebView |
5656

5757
Developers can also select a different system browser for MSAL apps:
5858

@@ -63,19 +63,19 @@ Developers can also select a different system browser for MSAL apps:
6363

6464
[WKWebView](https://developer.apple.com/documentation/webkit/wkwebview) is an in-app browser that displays web content. It doesn't share cookies or web site data with other **WKWebView** instances, or with the Safari browser. WKWebView is a cross-platform browser that is available for both iOS and macOS.
6565

66-
## Cookie sharing and Single sign-on (SSO) implications
66+
## Cookie sharing and SSO implications
6767

6868
The browser you use impacts the SSO experience because of how they share cookies. The following tables summarize the SSO experiences per browser.
6969

70-
| Technology | Browser Type | iOS availability | macOS availability | Shares cookies and other data | MSAL availability | SSO |
71-
|:-------------:|:-------------:|:-------------:|:-------------:|:-------------:|:-------------:|-------------:|
72-
| [ASWebAuthenticationSession](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) | System | iOS12 and up | macOS 10.15 and up | Yes | iOS and macOS 10.15+ | w/ Safari instances
73-
| [SFAuthenticationSession](https://developer.apple.com/documentation/safariservices/sfauthenticationsession) | System | iOS11 and up | N/A | Yes | iOS only | w/ Safari instances
74-
| [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) | System | iOS11 and up | N/A | No | iOS only | No**
75-
| **SFSafariViewController** | System | iOS10 | N/A | Yes | iOS only | w/ Safari instances
76-
| **WKWebView** | In-app | iOS8 and up | macOS 10.10 and up | No | iOS and macOS | No**
70+
| Technology | Browser Type | iOS availability | macOS availability | Shares cookies and other data | MSAL availability | SSO |
71+
| :-----------------------------------------------------------------------------------------------------------------------: | :----------: | :--------------: | :----------------: | :---------------------------: | :------------------: | ------------------: |
72+
| [ASWebAuthenticationSession](https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession) | System | iOS12 and up | macOS 10.15 and up | Yes | iOS and macOS 10.15+ | w/ Safari instances |
73+
| [SFAuthenticationSession](https://developer.apple.com/documentation/safariservices/sfauthenticationsession) | System | iOS11 and up | N/A | Yes | iOS only | w/ Safari instances |
74+
| [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) | System | iOS11 and up | N/A | No | iOS only | No\*\* |
75+
| **SFSafariViewController** | System | iOS10 | N/A | Yes | iOS only | w/ Safari instances |
76+
| **WKWebView** | In-app | iOS8 and up | macOS 10.10 and up | No | iOS and macOS | No\*\* |
7777

78-
** For SSO to work, tokens need to be shared between apps. This requires a token cache, or broker application, such as Microsoft Authenticator for iOS.
78+
\*\* For SSO to work, tokens need to be shared between apps. This requires a token cache, or broker application, such as Microsoft Authenticator for iOS.
7979

8080
## Change the default browser for the request
8181

@@ -94,17 +94,20 @@ Additionally, MSAL supports passing in a custom `WKWebView` by setting the `MSAL
9494
For example:
9595

9696
Objective-C
97+
9798
```objc
9899
UIViewController *myParentController = ...;
99100
WKWebView *myCustomWebView = ...;
100101
MSALWebviewParameters *webViewParameters = [[MSALWebviewParameters alloc] initWithAuthPresentationViewController:myParentController];
101102
webViewParameters.webviewType = MSALWebviewTypeWKWebView;
102103
webViewParameters.customWebview = myCustomWebView;
103104
MSALInteractiveTokenParameters *interactiveParameters = [[MSALInteractiveTokenParameters alloc] initWithScopes:@[@"myscope"] webviewParameters:webViewParameters];
104-
105+
105106
[app acquireTokenWithParameters:interactiveParameters completionBlock:completionBlock];
106107
```
108+
107109
Swift
110+
108111
```swift
109112
let myParentController: UIViewController = ...
110113
let myCustomWebView: WKWebView = ...
@@ -149,17 +152,17 @@ typedef NS_ENUM(NSInteger, MSALWebviewType)
149152
For older macOS versions uses WKWebView
150153
*/
151154
MSALWebviewTypeDefault,
152-
155+
153156
/** Use ASWebAuthenticationSession where available.
154157
On older iOS versions uses SFAuthenticationSession
155158
Doesn't allow any other webview type, so if either of these are not present, fails the request*/
156159
MSALWebviewTypeAuthenticationSession,
157-
160+
158161
#if TARGET_OS_IPHONE
159-
162+
160163
/** Use SFSafariViewController for all versions. */
161164
MSALWebviewTypeSafariViewController,
162-
165+
163166
#endif
164167
/** Use WKWebView */
165168
MSALWebviewTypeWKWebView,

articles/active-directory/develop/quickstart-v2-python-webapp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: active-directory
88
ms.subservice: develop
99
ms.topic: portal
1010
ms.workload: identity
11-
ms.date: 11/22/2021
11+
ms.date: 01/24/2023
1212
ROBOTS: NOINDEX
1313
ms.author: henrymbugua
1414
ms.custom: aaddev, devx-track-python, "scenarios:getting-started", "languages:Python", mode-api

0 commit comments

Comments
 (0)