Skip to content

Commit 97d67df

Browse files
authored
Fixes typos in docs (authts#1443)
* Fixed typos.
1 parent 74e25c4 commit 97d67df

7 files changed

Lines changed: 24 additions & 24 deletions

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ If you are unfamiliar with OpenID Connect, then you should learn the
55
library is designed as a spec-compliant protocol library.
66

77
There are two main classes that you might want to use depend on the level at
8-
with you use to use the library:
8+
which you use to use the library:
99

1010
- [UserManager](classes/UserManager.html) provides a higher level API for
1111
signing a user in, signing out, managing the user's claims
@@ -118,12 +118,12 @@ const customState = { foo: "bar" };
118118
mgr.signinRedirect({ state: customState });
119119
```
120120

121-
After successful sign-in the custom state is part of the [User](classes/User.html#state) object as `state`. In case of failure it is inside [ErrorResponse](classes/ErrorResponse.html#state).
121+
After successful sign-in, the custom state is part of the [User](classes/User.html#state) object as `state`. In case of failure, it is inside [ErrorResponse](classes/ErrorResponse.html#state).
122122

123123
This custom state should not be confused with the URL state parameter. The latter is internally used to match against the authentication state object to finish the authentication process.
124124

125125
# Custom state in request url
126-
If you would like to encode a custom state string in the sign in request url, you can do so with the `url_state` parameter. You may want to do this in order to pass user state to the authentication server and/or a proxy and return that state as part of the response.
126+
If you would like to encode a custom state string in the sign-in request url, you can do so with the `url_state` parameter. You may want to do this in order to pass user state to the authentication server and/or a proxy and return that state as part of the response.
127127

128128
```javascript
129129
const mgr = new UserManager();

docs/migration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
The API is largely backwards-compatible.
44

5-
The "crypto-js" software library has been removed; the native crypto/crypto.subtle module built into the browser is instead used. All modern browsers are expected to support it. If you need to support older browsers stay with v2.4!
5+
The "crypto-js" software library has been removed; the native crypto/crypto.subtle module built into the browser is instead used. All modern browsers are expected to support it. If you need to support older browsers, stay with v2.4!
66

7-
The behavior of merging claims has been improved.
7+
The behavior of merging claims has been improved.
88

99
### [OidcClientSettings](https://authts.github.io/oidc-client-ts/interfaces/OidcClientSettings.html)
1010

@@ -13,7 +13,7 @@ The behavior of merging claims has been improved.
1313
- `userInfoJwtIssuer`
1414
- `refreshTokenCredentials` use `fetchRequestCredentials`
1515
- the `mergeClaims` has been replaced by `mergeClaimsStrategy`
16-
- if the previous behavior is required `mergeClaimsStrategy: { array: "merge" }` comes close to it
16+
- if the previous behavior is required, `mergeClaimsStrategy: { array: "merge" }` comes close to it
1717
- default of `response_mode` changed from `query` → `undefined`
1818

1919

@@ -32,7 +32,7 @@ removed.
3232
- `staleStateAge` → `staleStateAgeInSeconds`
3333
- default of `loadUserInfo` changed from `true` → `false`
3434
- removed `ResponseValidatorCtor` and `MetadataServiceCtor`
35-
- if necessary `OidcClient` / `UserManager` classes may be extended to alter
35+
- if necessary, `OidcClient` / `UserManager` classes may be extended to alter
3636
their behavior
3737
- restricted `response_type` to `code` flow only. As per [OAuth 2.1](https://oauth.net/2.1/): **PKCE is required** for all OAuth clients using the authorization `code` flow
3838
- as in oidc-client 1.x, OAuth 2.0 hybrid flows are not supported

docs/protocols/authorization-code-grant-with-pkce.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Authorization Code Grant with Proof Key for Code Exchange (PKCE)
22

3-
The authorization code protocol is part of OAuth 2.0 (defined in [OAuth 2.0 RFC 7636](https://tools.ietf.org/html/rfc7636)). It involves the exchange of an authorization code for a token. This is the recommend authorization code flow in the [OAuth 2.1 draft](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-10).
3+
The authorization code protocol is part of OAuth 2.0 (defined in [OAuth 2.0 RFC 7636](https://tools.ietf.org/html/rfc7636)). It involves the exchange of an authorization code for a token. This is the recommended authorization code flow in the [OAuth 2.1 draft](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-10).
44

55

66
## Principle of function

docs/protocols/authorization-code-grant.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ It implies some security risks, so you should only use it after a security asses
88

99
## Security concerns
1010
This flow can only be used for applications, which can protect the client secret:
11-
- **Native app**: Can not securely store the client secret, as its possible to decompile the application.
12-
- **Single-page app**: Can not securely store the client secret, as the full code is exposed in the users browser
11+
- **Native app**: Can not securely store the client secret, as it's possible to decompile the application.
12+
- **Single-page app**: Can not securely store the client secret, as the full code is exposed in the user's browser
1313

14-
In that scenarios [Authorization Code Grant with Proof Key for Code Exchange (PKCE)](authorization-code-grant-with-pkce.md) must be used.
14+
In that scenarios, [Authorization Code Grant with Proof Key for Code Exchange (PKCE)](authorization-code-grant-with-pkce.md) must be used.
1515

1616

1717
## Principle of function

docs/protocols/resource-owner-password-credentials-grant.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ It implies some security risks, so you should only use it after a security asses
88

99
## Security concerns
1010

11-
To start with, this flow is not part of the [Open ID Connect standard](https://openid.net/specs/openid-connect-core-1_0.html). Furthermore, although it is part of OAuth 2.0, it has been removed in the [OAuth 2.1 draft](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-10), and there are good reasons for this:
11+
To start with, this flow is not part of the [OpenID Connect standard](https://openid.net/specs/openid-connect-core-1_0.html). Furthermore, although it is part of OAuth 2.0, it has been removed in the [OAuth 2.1 draft](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-07#section-10), and there are good reasons for this:
1212

1313
* When using this flow, the credentials of the user are exposed to the client application. The RFC mandates that ["the client application MUST discard the credentials once the access token has been obtained"](https://www.rfc-editor.org/rfc/rfc6749#section-4.3.1), but there is no technical way for the Identity Provider / Authorization Server to enforce this point. This flow MUST NOT be allowed unless the Client can be enforced to fulfill this requirement through other means (probably because both are under the same security domain, probably the same organization or similar constraints). This point is covered [several](https://www.rfc-editor.org/rfc/rfc6749#section-1.3.3) [times](https://www.rfc-editor.org/rfc/rfc6749#section-4.3) during the RFC and by some IdP implementations, such as [Auth0](https://auth0.com/docs/get-started/authentication-and-authorization-flow/resource-owner-password-flow) or [Keycloak](https://www.keycloak.org/docs/latest/securing_apps/#_resource_owner_password_credentials_flow), but it is sometimes quickly ignored by some developers.
1414

1515
* Even if the previous point is covered, this flow is increasing the attack surface of the system. For example, if the Client Application is compromised (maybe through an XSS attack, for example), the credentials of the user are exposed, so the attacker have access to other applications accessible by the user. In comparison, for example, in the Authorization Code Flow if the Client Application is equally compromised only the access token is exposed, usually meaning that only the given application has been compromised. A different way to see this is: usually the IdP/Authorization Server are strongly protected, and the Client Applications are allowed lower levels of security auditing... but when using this flow, if any of them is exposed, the user credentials are exposed; so both of them should be equally treated regarding security.
1616

17-
Therefor, this flow MUST NOT be used as a replacement for the Authorization Code flow. This flow can only be seen as a replacement of classic form-based user/password authentication directly in the application.
17+
Therefore, this flow MUST NOT be used as a replacement for the Authorization Code flow. This flow can only be seen as a replacement of classic form-based user/password authentication directly in the application.
1818

19-
Then, why are we adding this support in `oidc-client-ts`? Well... form-based user/password authentication is actually widely used in the industry, and using a standard IdP as authenticator for this architecture has some benefits (other things, such as password expiration, user management back-office, etc are provided for free by the IdP). So this flow can be an easy help in this scenario. But you MUST NOT use this flow believing that you are having all the security benefits of OpenId Connect or OAuth; you are not.
19+
Then, why are we adding this support in `oidc-client-ts`? Well... form-based user/password authentication is actually widely used in the industry, and using a standard IdP as authenticator for this architecture has some benefits (other things, such as password expiration, user management back-office, etc are provided for free by the IdP). So this flow can be an easy help in this scenario. But you MUST NOT use this flow believing that you are having all the security benefits of OpenID Connect or OAuth; you are not.
2020

2121

2222
## Principle of function

src/UserManager.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class UserManager {
179179

180180
/**
181181
* Process the response (callback) from the authorization endpoint.
182-
* It is recommend to use {@link UserManager.signinCallback} instead.
182+
* It is recommended to use {@link UserManager.signinCallback} instead.
183183
*
184184
* @returns A promise containing the authenticated `User`.
185185
*
@@ -261,7 +261,7 @@ export class UserManager {
261261
}
262262
/**
263263
* Notify the opening window of response (callback) from the authorization endpoint.
264-
* It is recommend to use {@link UserManager.signinCallback} instead.
264+
* It is recommended to use {@link UserManager.signinCallback} instead.
265265
*
266266
* @returns A promise
267267
*
@@ -344,7 +344,7 @@ export class UserManager {
344344
/**
345345
*
346346
* Notify the parent window of response (callback) from the authorization endpoint.
347-
* It is recommend to use {@link UserManager.signinCallback} instead.
347+
* It is recommended to use {@link UserManager.signinCallback} instead.
348348
*
349349
* @returns A promise
350350
*
@@ -363,7 +363,7 @@ export class UserManager {
363363
* - {@link UserManager.signinPopupCallback}
364364
* - {@link UserManager.signinSilentCallback}
365365
*
366-
* @throws `Error` If request_type is unknown or signout can not processed.
366+
* @throws `Error` If request_type is unknown or signout cannot be processed.
367367
*/
368368
public async signinCallback(url = window.location.href): Promise<User | void> {
369369
const { state } = await this._client.readSigninResponseState(url);
@@ -386,7 +386,7 @@ export class UserManager {
386386
* - {@link UserManager.signoutPopupCallback}
387387
* - {@link UserManager.signoutSilentCallback}
388388
*
389-
* @throws `Error` If request_type is unknown or signout can not processed.
389+
* @throws `Error` If request_type is unknown or signout cannot be processed.
390390
*/
391391
public async signoutCallback(url = window.location.href, keepOpen = false): Promise<void> {
392392
const { state } = await this._client.readSignoutResponseState(url);
@@ -543,7 +543,7 @@ export class UserManager {
543543

544544
/**
545545
* Process response (callback) from the end session endpoint.
546-
* It is recommend to use {@link UserManager.signoutCallback} instead.
546+
* It is recommended to use {@link UserManager.signoutCallback} instead.
547547
*
548548
* @returns A promise containing signout response
549549
*
@@ -557,7 +557,7 @@ export class UserManager {
557557
}
558558

559559
/**
560-
* Trigger a redirect of a popup window window to the end session endpoint.
560+
* Trigger a redirect of a popup window to the end session endpoint.
561561
*
562562
* @returns A promise
563563
*/
@@ -587,7 +587,7 @@ export class UserManager {
587587

588588
/**
589589
* Process response (callback) from the end session endpoint from a popup window.
590-
* It is recommend to use {@link UserManager.signoutCallback} instead.
590+
* It is recommended to use {@link UserManager.signoutCallback} instead.
591591
*
592592
* @returns A promise
593593
*
@@ -676,7 +676,7 @@ export class UserManager {
676676

677677
/**
678678
* Notify the parent window of response (callback) from the end session endpoint.
679-
* It is recommend to use {@link UserManager.signoutCallback} instead.
679+
* It is recommended to use {@link UserManager.signoutCallback} instead.
680680
*
681681
* @returns A promise
682682
*

src/utils/PopupUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface PopupWindowFeatures {
1414
status?: boolean | string;
1515
resizable?: boolean | string;
1616
scrollbars?: boolean | string;
17-
/** Close popup window after time in seconds, by default it is -1. To enable this feature set value greater than 0 */
17+
/** Close popup window after time in seconds, by default it is -1. To enable this feature, set value greater than 0. */
1818
closePopupWindowAfterInSeconds?: number;
1919

2020
[k: string]: boolean | string | number | undefined;

0 commit comments

Comments
 (0)