Closed Edvinaz closed 1 year ago
Yes, I'm working on a fix for this, it will be ready shortly. Part of a bigger re-write.
I've just released https://github.com/dcblogdev/laravel-microsoft-graph/releases/tag/v3.2.0. the only changes required are updating the listener to the following if you're using the provided listener.
<?php
namespace App\Listeners;
use App\Models\User;
use Dcblogdev\MsGraph\MsGraph;
use Illuminate\Support\Facades\Auth;
class NewMicrosoft365SignInListener
{
public function handle($event)
{
$user = User::firstOrCreate([
'email' => $event->token['info']['mail'],
], [
'name' => $event->token['info']['displayName'],
'email' => $event->token['info']['mail'] ?? $event->token['info']['userPrincipalName'],
'password' => '',
]);
(new MsGraph())->storeToken(
$event->token['accessToken'],
$event->token['refreshToken'],
$event->token['expires'],
$user->id,
$user->email
);
Auth::login($user);
}
}
Also updated the docs to make them more clear.
Hi, I had service to upload/download files to oneDrive, everything worked fine, but this week i noticed (i dont really know when it started), but
msgraph:keep-alive
command throws error:maybe someone have idea why this happend? Nothing changed, tokens valid.