Skip to content

Commit f99f166

Browse files
lonnieezellMGatner
andauthored
Apply docs suggestions from code review
Co-authored-by: MGatner <[email protected]>
1 parent 4bb0e46 commit f99f166

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

docs/0 - install.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Installation
22

3-
These instructions assume that you have already [installed the CodeIgniter 4 app starter](https://codeigniter.com/user_guide/installation/installing_composer.html) as the basis for your new project, that you have setup your `.env` file and created a database, and can access
4-
it via the Spark CLI script.
3+
These instructions assume that you have already [installed the CodeIgniter 4 app starter](https://codeigniter.com/user_guide/installation/installing_composer.html) as the basis for your new project, set up your `.env` file, and created a database that you can access via the Spark CLI script.
54

65
Installation is done through [Composer](https://getcomposer.org). The example assumes you have it installed globally.
76
If you have it installed as a phar, or othewise you will need to adjust the way you call composer itself.

docs/1 - concepts.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on the standard Config class if nothing is found in the database.
1717

1818
## User Providers
1919

20-
You can use your own models to handle user persistence. Shield calls this class the `User Provider` class. A default model
20+
You can use your own models to handle user persistence. Shield calls this the "User Provider" class. A default model
2121
is provided for you at `CodeIgniter\Shield\Models\UserModel`. You can change this in the `Config\Auth->userProvider` setting.
2222
The only requirement is that your new class MUST extend the provided `UserModel`.
2323

@@ -31,11 +31,10 @@ User accounts are stored separately from the information needed to identify that
3131
called User Identities. By default, the library has two types of identities: one for standard email/password information,
3232
and one for access tokens.
3333

34-
By keeping the identity information loosely coupled from the user account itself, it frees the system up to more easily
35-
integrate third-party sign-in systems, JWT systems, and more, all on a single user.
34+
Keeping these identities loosely coupled from the user account itself facilitates integrations with third-party sign-in systems, JWT systems, and more - all on a single user.
3635

3736
While this has the potential to make the system more complex, the `email` and `password` fields are automatically
38-
looked up for you when attempting to access from the User entity. Caution should be used to craft queries that will pull
37+
looked up for you when attempting to access them from the User entity. Caution should be used to craft queries that will pull
3938
in the `email` field when you need to display it to the user, as you could easily run into some n+1 slow queries otherwise.
4039

4140
When you `save($user)` a `User` instance in the `UserModel`, the email/password identity will automatically be updated.

docs/2 - authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Authentication is the process of determining that a visitor actually belongs to your website,
44
and identifying them. Shield provides a flexible and secure authentication system for your
5-
web apps and API's.
5+
web apps and APIs.
66

77
## Available Authenticators
88

docs/3 - auth_actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ and provides feedback. In the `Email2FA` class, it verifies the code against wha
7373
database and either sends them back to the previous form to try again or redirects the user to the
7474
page that a `login` task would have redirected them to anyway.
7575

76-
All methods should return either a `RedirectResponse` or string of a view, like through the `view()` method.
76+
All methods should return either a `RedirectResponse` or a view string (e.g. using the `view()` function).

docs/4 - authorization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public $matrix = [
7474

7575
## Authorizing Users
7676

77-
When the `Authorizable` trait on the `User` entity provides the following methods to authorize your users.
77+
The `Authorizable` trait on the `User` entity provides the following methods to authorize your users.
7878

7979
#### can()
8080

docs/7 - customization.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,17 @@ public function loginRedirect(): string
5353
Shield has the following controllers that can be extended to handle
5454
various parts of the authentication process:
5555

56-
- **ActionController** handles the after login and after-registration actions that can be ran, like Two Factor Authentication and Email Verification.
56+
- **ActionController** handles the after-login and after-registration actions, like Two Factor Authentication and Email Verification.
5757

5858
- **LoginController** handles the login process.
5959

6060
- **RegisterController** handles the registration process. Overriding this class allows you to customize the User Provider, the User Entity, and the validation rules.
6161

62-
- **MagicLinkController** handles the "lost password" process that allows a user to login with a link sent to their email. Allows you to
62+
- **MagicLinkController** handles the "lost password" process that allows a user to login with a link sent to their email. This allows you to
6363
override the message that is displayed to a user to describe what is happening, if you'd like to provide more information than simply swapping out the view used.
6464

65-
It is not recommended to copy the entire controller into app and change it's namespace. Instead, you should create a new controller that extends
66-
the existing controller and then only override the methods needed. This allows the other methods to always stay up to date with any security
65+
It is not recommended to copy the entire controller into **app/Controllers** and change its namespace. Instead, you should create a new controller that extends
66+
the existing controller and then only override the methods needed. This allows the other methods to stay up to date with any security
6767
updates that might happen in the controllers.
6868

6969
```php

0 commit comments

Comments
 (0)