The wp-admin pages of a WordPress site are not usually accessible without requiring a user to login. I don’t understand why you would want to whitelist the wp-admin area even if you could.
Normal WordPress functionality requires users to login to view the wp-admin and it should send them to the WP dashboard by default if they’ve gone directly to the login URL.
If a visitor tries to view one of the front-end pages, like the homepage or a post..etc, that is when they get redirected to the login screen which sends them back to the page or post they tried to view in the first place.
Also, if you’re trying to whitelist everything in the wp-admin directory and not just the single page URL, try this code instead:
function my_forcelogin_whitelist( $whitelist ) {
// list of single page URLs
$whitelist[] = site_url( '/forgot-password/' );
$whitelist[] = site_url( '/register/' );
// add any page URL within a directory to my whitelist
if( in_array('wp-admin', explode('/', $_SERVER['REQUEST_URI'])) ) {
$whitelist[] = site_url($_SERVER['REQUEST_URI']);
}
return $whitelist;
}
add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1);