You can't access the $_COOKIE
in this hook. You can only access $_COOKIE
after the page HTTP headers are set with the $_COOKIE
its mean in the next page.
You have other hook that you can hook into to get the cookies in the function wp_set_auth_cookie()
there is this action at the end.
do_action( 'set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in', $token );
So you can use it like this:
add_action('set_logged_in_cookie', 'custom_get_logged_in_cookie', 10, 6);
function custom_get_logged_in_cookie($logged_in_cookie, $expire, $expiration, $user_id, $logged_in_text, $token) {
// do something...
}