complaining about this:
return [
'token' => $access_token['access_token'],
'email' => $data['email'],
];
Is anyone else having problem?
I changed it to:
if ($data) {
$data = $data->getAttributes();
}
return [
'token' => json_decode($access_token, true)['access_token'],
'email' => $data['payload']['email'] ,
];
Now it works. Wondering why I had to do this, if the original works for other people.