Skip to content

Commit

Permalink
feat: log uid with nonce failed message
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed Oct 10, 2024
1 parent c90535f commit ca27f36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/oauth/class-google-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ public static function oauth_callback() {
}

if ( ! wp_verify_nonce( sanitize_text_field( $_GET[ self::AUTH_CALLBACK ] ), self::AUTH_CALLBACK ) ) {
self::handle_error( __( 'Nonce verification failed.', 'newspack-plugin' ) );
/* translators: %s is a unique user id */
sprintf( __( 'Nonce verification failed for id: %s', 'newspack-plugin' ), OAuth::get_unique_id() );
wp_die( esc_html__( 'Invalid nonce.', 'newspack-plugin' ) );
return;
}
Expand Down

0 comments on commit ca27f36

Please sign in to comment.