Skip to content

How do I configure Forcing Password Reset? #639

Answered by datamweb
GMSantiago-Dev asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,
I wasn't PR when this feature was added to Shield, never checked it after the merge. You made me play a little!

At first I was confused myself, and I was going to make some changes, but I got ahead of myself! Now you can proceed as follows:

1. step
Set the following value in file App/Config/Auth.php.

public array $redirects = [
// ...
 'force_reset' => 'change-password',
];

2. step
Set the following value in file App/Config/Filters.php

    public array $globals = [
        'before' => [
        'force-reset' => ['except' => ['login*', 'register', 'auth/a/*', 'change-password', 'logout']],
        // 'session' => ['except' => ['login*', 'register', 'auth/a/*']],
        ],
        'a…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@GMSantiago-Dev
Comment options

@mshannaq
Comment options

@datamweb
Comment options

@datamweb
Comment options

Answer selected by GMSantiago-Dev
Comment options

You must be logged in to vote
2 replies
@datamweb
Comment options

@mikeeyo23
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants