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

Call an action when user is authenticated #324

Merged
merged 4 commits into from
Feb 6, 2020
Merged

Call an action when user is authenticated #324

merged 4 commits into from
Feb 6, 2020

Conversation

jakubmikita
Copy link
Contributor

We cannot determine when the user has been actually authenticated after the second factor.

We cannot hook into the wp_login nor set_logged_in_cookie as this plugin is hooking into this action to remove authentication cookie and present the second factor form.

@kasparsd
Copy link
Collaborator

This looks great, thank you for the contribution @Kubitomakita!

Could you please document the hook in the readme file? Maybe extend the Description section of the readme with a sub-section "Hooks & Filters":

= Actions & Filters =

Here is a list of action and filter hooks provided by the plugin:

- `two_factor_user_authenticated` action which receives the logged in `WP_User` object as the first argument for determining the logged in user right after the authentication workflow. 

@jakubmikita
Copy link
Contributor Author

Sure thing @kasparsd! Just added

@kasparsd
Copy link
Collaborator

kasparsd commented Feb 5, 2020

@Kubitomakita Looks like phpcs found the following issue:

/class-two-factor-core.php:648:1: error - Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)

Could you please fix that?

@jakubmikita
Copy link
Contributor Author

I'm sorry, saw the Travis failed but couldn't see the error in the log... now everything's ok.

@kasparsd kasparsd merged commit a5a4ad7 into WordPress:master Feb 6, 2020
@jakubmikita jakubmikita deleted the patch-1 branch February 6, 2020 14:21
@jeffpaul jeffpaul added this to the 0.5.2 milestone Jan 12, 2022
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

Successfully merging this pull request may close these issues.

3 participants