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
+34-69
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@
12
12
13
13
> This is a new version of this SDK, the new pod name is [OktaOidc](https://cocoapods.org/pods/OktaOidc). The old [OktaAuth](https://cocoapods.org/pods/OktaAuth) pod is now deprecated.
14
14
15
-
This library is a swift wrapper around the [AppAuth-iOS](https://github.com/openid/AppAuth-iOS)objective-c code for communicating with Okta as an OAuth 2.0 + OpenID Connect provider, and follows current best practice for native apps using [Authorization Code Flow + PKCE](https://developer.okta.com/authentication-guide/implementing-authentication/auth-code-pkce).
15
+
This library is a Swift wrapper around the [AppAuth-iOS](https://github.com/openid/AppAuth-iOS)Objective-C code for communicating with Okta as an OAuth 2.0 + OpenID Connect provider, and follows current best practice for native apps using [Authorization Code Flow + PKCE](https://developer.okta.com/authentication-guide/implementing-authentication/auth-code-pkce).
16
16
17
-
You can learn more on the [Okta + iOS](https://developer.okta.com/code/ios/) page in our documentation. You can also download our [sample application](https://github.com/okta/samples-ios/tree/master/browser-sign-in)
17
+
You can learn more on the [Okta + iOS](https://developer.okta.com/code/ios/) page in our documentation. You can also download our [sample application](https://github.com/okta/samples-ios/tree/master/browser-sign-in).
18
18
19
19
**Table of Contents**
20
20
@@ -41,6 +41,7 @@ You can learn more on the [Okta + iOS](https://developer.okta.com/code/ios/) pag
- An Okta account, called an _organization_ (sign up for a free [developer organization](https://developer.okta.com/signup/) if you need one).
54
55
- An Okta Application, configured as a Native App. This is done from the Okta Developer Console and you can find instructions [here](https://developer.okta.com/authentication-guide/implementing-authentication/auth-code-pkce). When following the wizard, use the default properties. They are designed to work with our sample applications.
55
56
57
+
**Note:** If you would like to use your own in-app user interface instead of the web browser, you can do so by using our [Swift Authentication SDK](https://github.com/okta/okta-auth-swift).
58
+
56
59
## Supported Platforms
57
60
58
61
### iOS
59
62
Okta OIDC supports iOS 11 and above.
60
63
61
64
### macOS
62
-
Okta OIDC supports macOS (OS X) 10.10 and above. Library supports both custom schemes; a loopback HTTP redirects via a small embedded server.
65
+
Okta OIDC supports macOS (OS X) 10.14 and above. Library supports both custom schemes; a loopback HTTP redirects via a small embedded server.
63
66
64
67
## Install
65
68
@@ -93,6 +96,12 @@ To integrate this SDK into your Xcode project using [Carthage](https://github.co
93
96
github "okta/okta-oidc-ios"
94
97
```
95
98
99
+
Then install it into your project:
100
+
101
+
`carthage update --use-xcframeworks`
102
+
103
+
**Note:** Make sure Carthage version is 0.37.0 or higher. Otherwise, Carthage can fail.
104
+
96
105
## Usage Guide
97
106
98
107
For an overview of this library's features and authentication flows, check out [our developer docs](https://developer.okta.com/code/ios).
@@ -151,7 +160,7 @@ The easiest way is to create a property list in your application's bundle. By de
151
160
152
161
### Configuration object
153
162
154
-
Alternatively, you can create a configuration object (`OktaOidcConfig`) from dictionary with the required values:
163
+
Alternatively, you can create a configuration object (`OktaOidcConfig`) from dictionary with the required values:
**Note:** In OktaOidc SDK 3.0 we added support for multiple Oauth 2.0 accounts. So developer can use Okta endpoint, social endpoint and others in one application. Therefore `OktaOidcStateManager` is stored in keychain using composite key constructed based on configuration. For backward compatibility there is a method `readFromSecureStorage()` that tries to read `OktaOidcStateManager` stored on a legacy way, so user could retrieve previously stored `OktaOidcStateManager` after switching to a newer version of SDK.
**Note:***You may need to update the emulator device to match your Xcode version*
474
+
**Note:***You may need to update the emulator device to match your Xcode version.*
466
475
467
476
## Modify network requests
468
477
@@ -505,53 +514,9 @@ Known iOS issue where iOS doesn't provide any good ways to terminate active auth
505
514
506
515
You can also consider the following workarounds:
507
516
- Use `noSSO` option in OIDC configuration object if you don't need SSO capabilites. Also note that this option works only on iOS 13+ versions
508
-
- Fork repository and change user-agent implementation(`OIDExternalUserAgentIOS.m`) to use `SFSafariViewController` only. Some pitfalls of this approach described [here](https://github.com/okta/okta-oidc-ios/issues/181)
509
-
510
-
### Carthage fails on Xcode 12
511
-
Carthage throws the error when you install the dependencies with the command `carthage update`. The issue happens only on Xcode 12 and higher versions:
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/2x/q10zv0gx4112thm7dd13szmm0000gn/T/carthage-xcodebuild.YaJjLW.log
519
-
```
520
-
521
-
The reason is that Xcode 12 introduced support of the Apple Silicon and Xcode generates duplicated architectures in frameworks. XCFrameworks are still not supported by Carthage, therefore a workaround should be used.
522
-
523
-
##### Solution #1: XCFrameworks
517
+
- Fork repository and change user-agent implementation(`OIDExternalUserAgentIOS.m`) to use `SFSafariViewController` only. Some pitfalls of this approach described [here](https://github.com/okta/okta-oidc-ios/issues/181).
524
518
525
-
You should update Carthage to the version 0.37.0 or higher.
519
+
## Contributing
526
520
527
-
1. Run in Terminal the following command:
528
-
```bash
529
-
brew upgrade carthage
530
-
```
531
-
2. Make sure the version is correct:
532
-
```bash
533
-
carthage version
534
-
```
535
-
3. Navigate through Terminal to project folder and run:
536
-
```bash
537
-
carthage update --use-xcframeworks
538
-
```
539
-
4. Open `General` settings tab in Xcode, in the `Frameworks, Libraries, and Embedded Content` section, drag and drop each XCFramework you want to use from the `Carthage/Build` folder.
540
-
541
-
> If your existing project is based on discrete framework bundles and you may want to migrate to XCFrameworks, then follow [Carthage migration documentation](https://github.com/Carthage/Carthage#migrating-a-project-from-framework-bundles-to-xcframeworks).
542
-
543
-
##### Solution #2: Workaround script
544
-
545
-
Launch Carthage via [the script](/scripts/carthage-xcode-12.sh), it will remove duplicated architectures and produce correct framework bundles.
546
-
547
-
1. Put the script somewhere to your `PATH` (e.g.: `/usr/local/bin/carthage.sh`).
548
-
2. Make the script executable, so open your Terminal and execute:
549
-
```sh
550
-
chmod +x /{path_to_script_folder}/carthage.sh
551
-
```
552
-
3. Run the script whenever you want to use Carthage:
553
-
```sh
554
-
carthage.sh update
555
-
```
521
+
We welcome contributions to all of our open-source packages. Please, see the [contribution guide](CONTRIBUTING.md) to understand how to structure a contribution.
556
522
557
-
For more information, follow [official Carthage documentation](https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md#workaround).
0 commit comments