Skip to content

Commit 3367b12

Browse files
author
Kadi Kraman
committed
Fix minor readme syntax
1 parent 06f9f98 commit 3367b12

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ const config = {
5959
issuer: '<YOUR_ISSUER_URL>',
6060
clientId: '<YOUR_CLIENT_ID>',
6161
redirectUrl: '<YOUR_REDIRECT_URL>',
62-
scopes: `<YOUR_SCOPES_ARRAY>`
62+
scopes: '<YOUR_SCOPES_ARRAY>'
6363
};
6464

6565
const result = await authorize(config);
6666
```
6767

68-
#### `config`
68+
#### config
6969

7070
This is your configuration object for the client. The config is passed into each of the methods
7171
with optional overrides.
@@ -78,7 +78,7 @@ with optional overrides.
7878
Must be string values! E.g. setting `additionalParameters: { hello: 'world', foo: 'bar' }` would add
7979
`hello=world&foo=bar` to the authorization request.
8080

81-
#### `result`
81+
#### result
8282

8383
This is the result from the auth server
8484

@@ -101,7 +101,7 @@ const config = {
101101
issuer: '<YOUR_ISSUER_URL>',
102102
clientId: '<YOUR_CLIENT_ID>',
103103
redirectUrl: '<YOUR_REDIRECT_URL>',
104-
scopes: `<YOUR_SCOPES_ARRAY>`,
104+
scopes: '<YOUR_SCOPES_ARRAY>',
105105
};
106106

107107
const result = await refresh({
@@ -121,12 +121,12 @@ const config = {
121121
issuer: '<YOUR_ISSUER_URL>',
122122
clientId: '<YOUR_CLIENT_ID>',
123123
redirectUrl: '<YOUR_REDIRECT_URL>',
124-
scopes: `<YOUR_SCOPES_ARRAY>`,
124+
scopes: '<YOUR_SCOPES_ARRAY>',
125125
};
126126

127127
const result = await revoke({
128128
...config,
129-
refreshToken: `<REFRESH_TOKEN>`
129+
tokenToRevoke: `<TOKEN_TO_REVOKE>`
130130
});
131131
```
132132

@@ -338,7 +338,7 @@ const config = {
338338
issuer: '<YOUR_ISSUER_URL>',
339339
clientId: '<YOUR_CLIENT_ID>',
340340
redirectUrl: '<YOUR_REDIRECT_URL>',
341-
scopes: `<YOUR_SCOPES_ARRAY>`
341+
scopes: '<YOUR_SCOPES_ARRAY>'
342342
};
343343

344344
// use the client to make the auth request and receive the authState
@@ -373,10 +373,13 @@ const config = {
373373
const authState = await authorize(config);
374374

375375
// Refresh token
376-
const refreshedState = refresh({ ...config, refreshToken: authState.refreshToken });
376+
const refreshedState = await refresh({
377+
...config,
378+
refreshToken: authState.refreshToken,
379+
});
377380

378381
// Revoke token, note that Identity Server expects a client id on revoke
379-
await appAuth.revoke({
382+
await revoke({
380383
...config,
381384
tokenToRevoke: refreshedState.refreshToken,
382385
sendClientId: true
@@ -399,7 +402,7 @@ const config = {
399402
const authState = await authorize(config);
400403

401404
// Refresh token
402-
const refreshedState = appAuth.refresh({
405+
const refreshedState = await refresh({
403406
...config,
404407
refreshToken: authState.refreshToken
405408
});

0 commit comments

Comments
 (0)