@@ -18,6 +18,7 @@ This library _should_ support any OAuth provider that implements the
1818[ OAuth2 spec] ( https://tools.ietf.org/html/rfc6749#section-2.2 ) and it has been tested with:
1919
2020* [ Identity Server4] ( https://demo.identityserver.io/ ) ([ Example configuration] ( #identity-server-4 ) )
21+ * [ Identity Server3] ( https://github.com/IdentityServer/IdentityServer3 ) ([ Example configuration] ( #identity-server-3 ) )
2122* [ Google] ( https://developers.google.com/identity/protocols/OAuth2 )
2223 ([ Example configuration] ( #google ) )
2324* [ Okta] ( https://developer.okta.com ) ([ Example configuration] ( #okta ) )
@@ -375,23 +376,6 @@ This library supports authenticating for Identity Server 4 out of the box. Some
3753762 . In order to revoke the access token, we must sent client id in the method body of the request.
376377 This is not part of the OAuth spec.
377378
378- <details >
379- <summary >Example server configuration</summary >
380- <code >
381- var client = new Client
382- {
383- ClientId = "native.code",
384- ClientName = "Native Client (Code with PKCE)",
385- RequireClientSecret = false,
386- RedirectUris = { "io.identityserver.demo:/oauthredirect" },
387- AllowedGrantTypes = GrantTypes.Code,
388- RequirePkce = true,
389- AllowedScopes = { "openid", "profile" },
390- AllowOfflineAccess = true
391- };
392- </code >
393- </details >
394-
395379``` js
396380// Note "offline_access" scope is required to get a refresh token
397381const config = {
@@ -417,26 +401,28 @@ await revoke(config, {
417401});
418402```
419403
420- ### Identity Server 3
421-
422- This library supports authenticating with Identity Server 3. The only difference from
423- Identity Server 4 is that it requires a ` clientSecret ` and there is no way to opt out of it.
424-
425404<details >
426405 <summary >Example server configuration</summary >
427- <code >
406+ <code style={{display: 'block', whiteSpace: 'pre-wrap' }} >
428407 var client = new Client
429408 {
430409 ClientId = "native.code",
431410 ClientName = "Native Client (Code with PKCE)",
432- Flow = Flows.AuthorizationCodeWithProofKey,
433- RedirectUris = { "com.your.app.name:/oauthredirect" },
434- ClientSecrets = new List<Secret> { new Secret("secret".Sha256()) },
435- AllowAccessToAllScopes = true,
411+ RequireClientSecret = false,
412+ RedirectUris = { "io.identityserver.demo:/oauthredirect" },
413+ AllowedGrantTypes = GrantTypes.Code,
414+ RequirePkce = true,
415+ AllowedScopes = { "openid", "profile" },
416+ AllowOfflineAccess = true
436417 };
437418 </code >
438419</details >
439420
421+ ### Identity Server 3
422+
423+ This library supports authenticating with Identity Server 3. The only difference from
424+ Identity Server 4 is that it requires a ` clientSecret ` and there is no way to opt out of it.
425+
440426``` js
441427// You must include a clientSecret
442428const config = {
@@ -463,6 +449,19 @@ await revoke(config, {
463449});
464450```
465451
452+ <details >
453+ <summary >Example server configuration</summary >
454+ var client = new Client
455+ {
456+ ClientId = "native.code",
457+ ClientName = "Native Client (Code with PKCE)",
458+ Flow = Flows.AuthorizationCodeWithProofKey,
459+ RedirectUris = { "com.your.app.name:/oauthredirect" },
460+ ClientSecrets = new List<Secret> { new Secret("your-client-secret".Sha256()) },
461+ AllowAccessToAllScopes = true,
462+ };
463+ </details >
464+
466465### Google
467466
468467Full support out of the box.
0 commit comments