Invalid Scope: Array (Please check lower letter case or delimiter) code example

Example: Invalid Scope: Array (Please check lower letter case or delimiter)

I was passing the config like this :

$config = [
        'callback' => HttpClient\Util::getCurrentUrl(),
        'providers' => [
            PROVIDER => [
                "enabled" => true,
                "keys"    => [
                "id" => "nnnnnnnnnnnnnnn",
                "secret" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ],
                "scope"   => ['public_profile', 'email']
            ],         
        ],
];
    
    
I changed my scope to this, and that seemed to fix it:

"scope" => 'email,public_profile'