Based on the work of the Garth library. Basic Garmin Connect / Auth client library
composer require jjtbsomhorst/garminsso
<?php
use garmin\sso\GarminClient;
$client = new GarminClient();
$client
->username('username')
->password('password')
->cookieJarLocation('path')
->login();
$activities $client->getActivities();