I am using the add_action with wp_login to set a localstorage item on login. Its working fine when I try to login at the wp-admin page but instead of going through with the login it goes to the wp-login.php and is just a blank page. Any ideas on this?
Here is my actual code:
function set_storage_yes()
{
echo '<script type="text/javascript">window.localStorage.setItem(\'loggedIn\', \'true\'); </script>';
}
add_action('wp_login', 'set_storage_yes', 10);