diff --git a/src/Auth0JWT.php b/src/Auth0JWT.php index 8b8d8474..e179cf4d 100644 --- a/src/Auth0JWT.php +++ b/src/Auth0JWT.php @@ -53,7 +53,7 @@ public static function encode($client_id, $client_secret, $scopes = null, $custo $payload["scopes"] = $scopes; } - if ($scopes) { + if ($custom_payload) { $custom_payload = array_merge($custom_payload, $payload); }