andrewheberle/wordpress-ah-jwt-auth

Native hooks

Closed this issue · 2 comments

There is init hook use that isn't proper one.

add_action('admin_init', array($this, 'registerSettingsAction'));

I propose to switch to:

add_action( 'login_form', array($this, 'function_name') );

Propose to add use of other pages as well when action by token can occur automatically (registration, password reset etc.)

After answer: https://gitlab.com/andrewheberle/ah-jwt-auth/-/issues/1#note_699041229

Yes, you have right. It is better option than init and login_form. Login form hook is more frontend related than redirect.

I have made that change in commit f7b11aa

This will be released in a new version on WordPress.org soon.