Works just fine for me using League OAuth2 Client with 2.3.0 Beta 1 (I'd expect it also works with Beta 2 & 3).Nope, already tried but it returns a lot of empty fields but none shows who logs in right after I'm successfully authenticated.
Haven't retested on beta 3 though.
PHP:
$provider = new \League\OAuth2\Client\Provider\GenericProvider([
'clientId' => '...', // The client ID assigned to you by the provider
'clientSecret' => '...', // The client password assigned to you by the provider
'redirectUri' => 'http://dev.local/oauth/test.php',
'urlAuthorize' => 'http://dev.local/xf23/index.php?oauth2/authorize',
'urlAccessToken' => 'http://dev.local/xf23/index.php?api/oauth2/token',
'urlResourceOwnerDetails' => 'http://dev.local/xf23/index.php?api/me'
]);
Code:
Access Token: 2SHthq5lpp6qa8lRRFNq3VAhcVhlZmM1
Refresh Token: U5-HZPEHBiBmm4oBvH2L6WOn0YuwZvio
Expired in: 1712708864
Already expired? not expired
array ( 'me' => array ( 'avatar_urls' => array ( 'o' => NULL, 'h' => NULL, 'l' => NULL, 'm' => NULL, 's' => NULL, ), 'can_ban' => false, 'can_converse' => true, 'can_edit' => true, 'can_follow' => false, 'can_ignore' => false, 'can_post_profile' => true, 'can_view_profile' => true, 'can_view_profile_posts' => true, 'can_warn' => false, 'is_banned' => false, 'is_followed' => false, 'is_ignored' => false, 'is_staff' => true, 'last_activity' => 1712701661, 'location' => '', 'message_count' => 3, 'profile_banner_urls' => array ( 'l' => NULL, 'm' => NULL, ), 'question_solution_count' => 0, 'reaction_score' => 0, 'register_date' => 1710884408, 'signature' => '', 'trophy_points' => 1, 'user_id' => 1, 'user_title' => 'Administrator', 'username' => 'Kirby', 'view_url' => 'http://dev.local/xf23/index.php?members/kirby.1/', 'vote_score' => 0, 'warning_points' => 0, ), )
Last edited: