Skip to content

Commit

Permalink
Merge pull request #193 from rtCamp/fix/login-issue-with-expired-cookie
Browse files Browse the repository at this point in the history
Fix: Login issue - Need to click login with google button twice
  • Loading branch information
SH4LIN authored Jan 27, 2025
2 parents 0f0e5ca + 9fb22a1 commit c7d1869
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions login-with-google.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ function container(): Container {
function plugin(): Plugin {
static $plugin;

$reauth = filter_input( INPUT_GET, 'reauth', FILTER_SANITIZE_STRING );
if ( null !== $reauth ) {
if ( ! empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
wp_safe_redirect( wp_login_url() );
exit;
}
}

if ( null !== $plugin ) {
return $plugin;
}
Expand Down

0 comments on commit c7d1869

Please sign in to comment.