Skip to content

Commit

Permalink
feat: cookie expiry time added for the one tap login
Browse files Browse the repository at this point in the history
  • Loading branch information
SH4LIN committed Aug 6, 2024
1 parent 63dec2f commit 76daac3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Modules/OneTapLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ public function authenticate(): void {
}

$wp_user = $this->authenticator->authenticate( $user );

// Adding filter to modify cookie expiry for one tap login.
add_filter( 'auth_cookie_expiration', [ $this->settings, 'modify_cookie_expiry' ] );
$this->authenticator->set_auth_cookies( $wp_user );
remove_filter( 'auth_cookie_expiration', [ $this->settings, 'modify_cookie_expiry' ] );
}
}

0 comments on commit 76daac3

Please sign in to comment.