Skip to content

Commit 6e11f81

Browse files
author
Kadi Kraman
committed
Improve documentation
1 parent 94646e3 commit 6e11f81

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,22 @@ Furthermore, `RNAppAuth` expects the delegate instance to conform to the protoco
268268
Make `AppDelegate` conform to `RNAppAuthAuthorizationFlowManager` with the following changes to `AppDelegate.h`:
269269

270270
```diff
271-
+#import <RNAppAuth/RNAppAuthAuthorizationFlowManager.h>
272-
+@interface AppDelegate : UIResponder <UIApplicationDelegate, RNAppAuthAuthorizationFlowManager>
273-
+@property(nonatomic, weak)id<RNAppAuthAuthorizationFlowManagerDelegate>authorizationFlowManagerDelegate;
271+
#import <RNAppAuth/RNAppAuthAuthorizationFlowManager.h>
272+
273+
- @interface AppDelegate : UIResponder <UIApplicationDelegate>
274+
+ @interface AppDelegate : UIResponder <UIApplicationDelegate, RNAppAuthAuthorizationFlowManager>
275+
276+
@property(nonatomic, weak)id<RNAppAuthAuthorizationFlowManagerDelegate>authorizationFlowManagerDelegate;
274277
```
275278

276279
The authorization response URL is returned to the app via the iOS openURL app delegate method, so
277280
you need to pipe this through to the current authorization session (created in the previous
278281
instruction). Thus, implement the following method from `UIApplicationDelegate` in `AppDelegate.m`:
279282

280-
```diff
281-
+ - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *, id> *)options {
282-
+ return return [self.authorizationFlowManagerDelegate resumeExternalUserAgentFlowWithURL:url];
283-
+ }
283+
```
284+
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *, id> *)options {
285+
return [self.authorizationFlowManagerDelegate resumeExternalUserAgentFlowWithURL:url];
286+
}
284287
```
285288

286289
#### Integration of the library with a Swift iOS project
@@ -574,9 +577,10 @@ Azure Active Directory [does not specify a revocation endpoint](https://docs.mic
574577
See the [Azure docs on requesting an access token](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code#request-an-authorization-code) for more info on additional parameters.
575578

576579
Please Note:
577-
* The [Azure docs](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code#request-an-authorization-code) recommend `'urn:ietf:wg:oauth:2.0:oob'` as the `redirectUrl`.
578-
* `Scopes` is ignored.
579-
* `additionalParameters.resource` may be required based on the tenant settings.
580+
581+
* The [Azure docs](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code#request-an-authorization-code) recommend `'urn:ietf:wg:oauth:2.0:oob'` as the `redirectUrl`.
582+
* `Scopes` is ignored.
583+
* `additionalParameters.resource` may be required based on the tenant settings.
580584

581585
```js
582586
const config = {

0 commit comments

Comments
 (0)