Skip to content

Commit 6d7567e

Browse files
committed
docs: move how to configure to quickstart.md
1 parent 6f03560 commit 6d7567e

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

docs/customization.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,9 @@ $routes->get('register', '\App\Controllers\Auth\RegisterController::registerView
2929

3030
## Custom Redirect URLs
3131

32-
By default, a successful login or register attempt will all redirect to `/`, while a logout action
33-
will redirect to a [named route](https://codeigniter.com/user_guide/incoming/routing.html#using-named-routes "See routing docs") `login` or a *URI path* `/login`. You can change the default URLs used within the `app/Config/Auth.php` config file:
34-
35-
```php
36-
public array $redirects = [
37-
'register' => '/',
38-
'login' => '/',
39-
'logout' => 'login',
40-
];
41-
```
42-
4332
### Customize Login Redirect
4433

45-
You can further customize where a user is redirected to on login with the `loginRedirect()` method of the `app/Config/Auth.php` config file. This is handy if you want to redirect based on user group or other criteria.
34+
You can customize where a user is redirected to on login with the `loginRedirect()` method of the `app/Config/Auth.php` config file. This is handy if you want to redirect based on user group or other criteria.
4635

4736
```php
4837
public function loginRedirect(): string

docs/quickstart.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ Learning any new authentication system can be difficult, especially as they get
3939

4040
If you need everyone to redirect to a single URL after login/logout/register actions, you can modify the `Config\Auth::$redirects` array in `app/Config/Auth.php` to specify the url to redirect to.
4141

42+
By default, a successful login or register attempt will all redirect to `/`, while a logout action
43+
will redirect to a [named route](https://codeigniter.com/user_guide/incoming/routing.html#using-named-routes "See routing docs") `login` or a *URI path* `/login`. You can change the default URLs used within the `app/Config/Auth.php` config file:
44+
4245
```php
4346
public array $redirects = [
4447
'register' => '/',

0 commit comments

Comments
 (0)