Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password resetter [activations] is not defined #1973

Closed
sebabal opened this issue Jun 23, 2020 · 18 comments
Closed

Password resetter [activations] is not defined #1973

sebabal opened this issue Jun 23, 2020 · 18 comments

Comments

@sebabal
Copy link

sebabal commented Jun 23, 2020

Bug Description

I am getting this "Password resetter [activations] is not defined." message after going to the user activation link eg: http://sg.homestead/!/auth/activate/204847e8eace205d4355d6bae1194bbe62821b0244f0f9f12535af78b810d856

How to Reproduce

  1. Create user
  2. Try to activate the user with the generated link

Extra Detail

https://flareapp.io/share/o7A2pz5p#F53

Environment

Statamic version: 3.0.0.-beta-31

PHP version: 7.3.19

Install method (choose one):

  • Fresh install from statamic/statamic
@jasonvarga
Copy link
Member

Can you provide your config/auth.php?

@sebabal
Copy link
Author

sebabal commented Jun 24, 2020

Jason sorry for the delay here it is...

<?php
​
return [
​
    /*
    |--------------------------------------------------------------------------
    | Authentication Defaults
    |--------------------------------------------------------------------------
    |
    | This option controls the default authentication "guard" and password
    | reset options for your application. You may change these defaults
    | as required, but they're a perfect start for most applications.
    |
    */
​
    'defaults' => [
        'guard' => 'web',
        'passwords' => 'users',
    ],
​
    /*
    |--------------------------------------------------------------------------
    | Authentication Guards
    |--------------------------------------------------------------------------
    |
    | Next, you may define every authentication guard for your application.
    | Of course, a great default configuration has been defined for you
    | here which uses session storage and the Eloquent user provider.
    |
    | All authentication drivers have a user provider. This defines how the
    | users are actually retrieved out of your database or other storage
    | mechanisms used by this application to persist your user's data.
    |
    | Supported: "session", "token"
    |
    */
​
    'guards' => [
        'web' => [
            'driver' => 'session',
            'provider' => 'users',
        ],
​
        'api' => [
            'driver' => 'token',
            'provider' => 'users',
        ],
    ],
​
    /*
    |--------------------------------------------------------------------------
    | User Providers
    |--------------------------------------------------------------------------
    |
    | All authentication drivers have a user provider. This defines how the
    | users are actually retrieved out of your database or other storage
    | mechanisms used by this application to persist your user's data.
    |
    | If you have multiple user tables or models you may configure multiple
    | sources which represent each model / table. These sources may then
    | be assigned to any extra authentication guards you have defined.
    |
    | Supported: "statamic", "database", "eloquent"
    |
    */
​
    'providers' => [
        'users' => [
            'driver' => 'statamic',
        ],
    ],
​
    /*
    |--------------------------------------------------------------------------
    | Resetting Passwords
    |--------------------------------------------------------------------------
    |
    | You may specify multiple password reset configurations if you have more
    | than one user table or model in the application and you want to have
    | separate password reset settings based on the specific user types.
    |
    | The expire time is the number of minutes that the reset token should be
    | considered valid. This security feature keeps tokens short-lived so
    | they have less time to be guessed. You may change this as needed.
    |
    */
​
    'passwords' => [
        'users' => [
            'provider' => 'users',
            'table' => 'password_resets',
            'expire' => 60,
        ],
    ],
​
];

@jasonvarga
Copy link
Member

Grab the updated auth.php from statamic/statamic

@sebabal
Copy link
Author

sebabal commented Jun 24, 2020

Jason sorry which file? I am not sure where that one is located....

@sebabal
Copy link
Author

sebabal commented Jun 24, 2020

Nevermind I was looking at the wrong repo..duh!

@sebabal
Copy link
Author

sebabal commented Jun 24, 2020

Jason, now the activation page is displaying but we are getting:

"Password reset token is invalid"

...when we try to setup the password.

Any ideas?

@jasonvarga
Copy link
Member

What URL are you seeing that error on?

@sebabal
Copy link
Author

sebabal commented Jun 25, 2020

It's the URL for activation that you get when you create a user...

eg: http://sg.homestead/!/auth/activate/948dc3b231a699b5b3283d038f59aa2c23fcdb810059e830cabd876fdd6e935d

@jasonvarga
Copy link
Member

Is it an old token? Try the whole reset password workflow again. Don't click a link from an existing email.

@sebabal
Copy link
Author

sebabal commented Jun 25, 2020

That link was used a minute after receiving the email to activate the user. We will try the whole reset workflow and let you know.

@jackmcdade
Copy link
Member

Is this still an issue?

@sebabal
Copy link
Author

sebabal commented Jul 3, 2020

Hi yes this is still an issue.

The whole password reset workflow is working but the activation workflow is not.

I just tried again and got the same error...running the latest beta.

image

@sebabal
Copy link
Author

sebabal commented Jul 3, 2020

I am sorry I think we need to split out the issue since the original problem got indeed resolved and then I encounter this other issue...

Do you want me to create a new issue?

Cheers

@jasonvarga
Copy link
Member

I have this almost fixed locally. Don’t worry about it.

@twd3
Copy link

twd3 commented Jul 14, 2020

Just got this out of my log after trying to reset password that might be new to this issue:

[2020-07-14 00:07:55] local.ERROR: Password resetter [resets] is not defined. {"exception":"[object] (InvalidArgumentException(code: 0): Password resetter [resets] is not defined. at /home/forge/www.domain.com/vendor/laravel/framework/src/Illuminate/Auth/Passwords/PasswordBrokerManager.php:65)

@twd3
Copy link

twd3 commented Jul 14, 2020

I just had to update the auth file in my config/statamic folder to get rid of this error.

@ReneWeCode
Copy link
Contributor

Dunno if related, but when I create a user, then the activation link the user gets gives a 500.

@curtisblackwell
Copy link

curtisblackwell commented Aug 18, 2020

I'm seeing this same issue. I just verified that I already have the latest config/auth.php. I'm on the latest version of Statamic (beta.44).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants