Skip to content

Added support for access token of string type#1390

Merged
atymic merged 2 commits intoSocialiteProviders:masterfrom
serious-angel:patch-1
Feb 4, 2026
Merged

Added support for access token of string type#1390
atymic merged 2 commits intoSocialiteProviders:masterfrom
serious-angel:patch-1

Conversation

@serious-angel
Copy link
Copy Markdown
Contributor

@serious-angel serious-angel commented Sep 7, 2025

Dear Developers, Artsts,

Thank you for the marvel you do...


Are we sure it is the valid access to the variable of access token?:

'access_token' => $token['access_token'],

Considering that the $token already is a string obtained from the following vendor method?:

protected function parseAccessToken($body)
{
    return Arr::get($body, 'access_token');
}

Source

Wouldn't we get an exception in that case?:

// Socialite::with('vkid')->user();
Cannot access offset of type string on string

We may see a similar approach in the following provider:

if (is_array($token)) {
$formToken['email'] = $token['email'] ?? null;
$token = $token['access_token'];
}


Best and kind regards ✨

@atymic
Copy link
Copy Markdown
Member

atymic commented Feb 4, 2026

Could you fix the conflicts please

@atymic atymic merged commit be9167d into SocialiteProviders:master Feb 4, 2026
3 checks passed
@serious-angel serious-angel deleted the patch-1 branch February 5, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants