7
7
[ ![ Build Status] ( https://travis-ci.org/FormidableLabs/react-native-app-auth.svg?branch=master )] ( https://travis-ci.org/FormidableLabs/react-native-app-auth )
8
8
[ ![ npm version] ( https://badge.fury.io/js/react-native-app-auth.svg )] ( https://badge.fury.io/js/react-native-app-auth )
9
9
10
- #### This is the API documentation for ` react-native-app-auth >= 2.0. ` [ See version ` 1.x ` documentation here] ( https://github.com/FormidableLabs/react-native-app-auth/tree/v1.0.1 ) .
10
+ #### This is the API documentation for ` react-native-app-auth >= 3.0. ` (pre-release)
11
+
12
+ [ See version ` 2.x ` documentation here] ( https://github.com/FormidableLabs/react-native-app-auth/tree/7a3fdc6e3572a998db99777b7562a7e63e0c2008 ) .
13
+
14
+ [ See version ` 1.x ` documentation here] ( https://github.com/FormidableLabs/react-native-app-auth/tree/v1.0.1 ) .
11
15
12
16
React Native bridge for [ AppAuth-iOS] ( https://github.com/openid/AppAuth-iOS ) and
13
17
[ AppAuth-Android] ( https://github.com/openid/AppAuth-Android ) SDKS for communicating with
@@ -18,7 +22,9 @@ This library _should_ support any OAuth provider that implements the
18
22
[ OAuth2 spec] ( https://tools.ietf.org/html/rfc6749#section-2.2 ) .
19
23
20
24
### Tested OpenID providers:
25
+
21
26
These providers are OpenID compliant, which means you can use [ autodiscovery] ( https://openid.net/specs/openid-connect-discovery-1_0.html ) .
27
+
22
28
* [ Identity Server4] ( https://demo.identityserver.io/ ) ([ Example configuration] ( #identity-server-4 ) )
23
29
* [ Identity Server3] ( https://github.com/IdentityServer/IdentityServer3 ) ([ Example configuration] ( #identity-server-3 ) )
24
30
* [ Google] ( https://developers.google.com/identity/protocols/OAuth2 )
@@ -27,7 +33,9 @@ These providers are OpenID compliant, which means you can use [autodiscovery](ht
27
33
* [ Keycloak] ( http://www.keycloak.org/ ) ([ Example configuration] ( #keycloak ) )
28
34
29
35
### Tested OAuth2 providers:
36
+
30
37
These providers implement the OAuth2 spec, but are not OpenID providers, which means you must configure the authorization and token endpoints yourself.
38
+
31
39
* [ Uber] ( https://developer.uber.com/docs/deliveries/guides/three-legged-oauth ) ([ Example configuration] ( #uber ) )
32
40
* [ Fitbit] ( https://dev.fitbit.com/build/reference/web-api/oauth2/ ) ([ Example configuration] ( #fitbit ) )
33
41
@@ -199,31 +207,31 @@ AppAuth supports three options for dependency management.
199
207
200
208
1 . ** CocoaPods**
201
209
202
- With [ CocoaPods] ( https://guides.cocoapods.org/using/getting-started.html ) , add the following line to
203
- your ` Podfile ` :
210
+ With [ CocoaPods] ( https://guides.cocoapods.org/using/getting-started.html ) , add the following line to
211
+ your ` Podfile ` :
204
212
205
- pod 'AppAuth', '>= 0.91'
213
+ pod 'AppAuth', '>= 0.91'
206
214
207
- Then run ` pod install ` . Note that version 0.91 is the first of the library to support iOS 11.
215
+ Then run ` pod install ` . Note that version 0.91 is the first of the library to support iOS 11.
208
216
209
217
2 . ** Carthage**
210
218
211
- With [ Carthage] ( https://github.com/Carthage/Carthage ) , add the following line to your ` Cartfile ` :
219
+ With [ Carthage] ( https://github.com/Carthage/Carthage ) , add the following line to your ` Cartfile ` :
212
220
213
- github "openid/AppAuth-iOS" "master"
221
+ github "openid/AppAuth-iOS" "master"
214
222
215
- Then run ` carthage bootstrap ` .
223
+ Then run ` carthage bootstrap ` .
216
224
217
225
3 . ** Static Library**
218
226
219
- You can also use [ AppAuth-iOS] ( https://github.com/openid/AppAuth-iOS ) as a static library. This
220
- requires linking the library and your project and including the headers. Suggested configuration:
227
+ You can also use [ AppAuth-iOS] ( https://github.com/openid/AppAuth-iOS ) as a static library. This
228
+ requires linking the library and your project and including the headers. Suggested configuration:
221
229
222
- 1 . Create an XCode Workspace.
223
- 2 . Add ` AppAuth.xcodeproj ` to your Workspace.
224
- 3 . Include libAppAuth as a linked library for your target (in the "General -> Linked Framework and
230
+ 1 . Create an XCode Workspace.
231
+ 2 . Add ` AppAuth.xcodeproj ` to your Workspace.
232
+ 3 . Include libAppAuth as a linked library for your target (in the "General -> Linked Framework and
225
233
Libraries" section of your target).
226
- 4 . Add ` AppAuth-iOS/Source ` to your search paths of your target ("Build Settings -> "Header Search
234
+ 4 . Add ` AppAuth-iOS/Source ` to your search paths of your target ("Build Settings -> "Header Search
227
235
Paths").
228
236
229
237
##### Register redirect URL scheme
@@ -252,7 +260,7 @@ your `Info.plist` as follows:
252
260
##### Define openURL callback in AppDelegate
253
261
254
262
You need to retain the auth session, in order to continue the
255
- authorization flow from the redirect. Follow these steps:
263
+ authorization flow from the redirect. Follow these steps:
256
264
257
265
` RNAppAuth ` will call on the given app's delegate via ` [UIApplication sharedApplication].delegate ` .
258
266
Furthermore, ` RNAppAuth ` expects the delegate instance to conform to the protocol ` RNAppAuthAuthorizationFlowManager ` .
@@ -432,7 +440,7 @@ await revoke(config, {
432
440
<details >
433
441
<summary >Example server configuration</summary >
434
442
435
- ```
443
+ ```
436
444
var client = new Client
437
445
{
438
446
ClientId = "native.code",
@@ -487,7 +495,7 @@ var client = new Client
487
495
{
488
496
ClientId = "native.code",
489
497
ClientName = "Native Client (Code with PKCE)",
490
- Flow = Flows.AuthorizationCodeWithProofKey,
498
+ Flow = Flows.AuthorizationCodeWithProofKey,
491
499
RedirectUris = { "com.your.app.name:/oauthredirect" },
492
500
ClientSecrets = new List<Secret> { new Secret("your-client-secret".Sha256()) },
493
501
AllowAccessToAllScopes = true
@@ -649,7 +657,6 @@ await revoke(config, {
649
657
});
650
658
```
651
659
652
-
653
660
## Contributors
654
661
655
662
Thanks goes to these wonderful people
0 commit comments