You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,8 @@ See those `redirect_uris`?
55
55
You can use the scheme you want, but you must **a)** declare the scheme you use in your `Info.plist` and **b)** register the very same URI on the authorization server you connect to.
56
56
57
57
Note that **as of iOS 9**, you _should_ use [Universal Links](https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html) as your redirect URL, rather than a custom app scheme.
58
-
This prevents others from re-using your URI scheme and intercept the authorization flow.
58
+
This prevents others from re-using your URI scheme and intercept the authorization flow.
59
+
If you **target iOS 12 and newer** you should be using `ASWebAuthenticationSession`, which makes using your own local redirect scheme secure.
59
60
60
61
Want to avoid switching to Safari and pop up a SafariViewController or NSPanel?
61
62
Set this:
@@ -142,7 +143,7 @@ If you want to dig deeper or do authorization yourself, here it goes:
142
143
### 4. Manually Authorize the User
143
144
144
145
By default the OS browser will be used for authorization if there is no access token present or in the keychain.
145
-
**Starting with iOS 9**, `SFSafariViewController` will be used when enabling embedded authorization on iOS.
146
+
**Starting with iOS 12**, `ASWebAuthenticationSession` will be used when enabling embedded authorization on iOS (previously, starting with iOS 9, `SFSafariViewController` was used instead).
146
147
147
148
To start authorization call **`authorize(params:callback:)`** or, to use embedded authorization, the convenience method `authorizeEmbedded(from:callback:)`.
148
149
@@ -409,7 +410,7 @@ Starting after version 4.2, on iOS 11 (`SFAuthenticationSession`) and iOS 12 (`A
0 commit comments