Open andrewlindemulder opened 3 years ago
At the Moment i use LaravelGmail::setUserId($userId)
but it's not that handy. I wish that I can store the refreshtoken to use it for my requests for different users in my system.
Here is my dirty workaround:
Redirect to Gmail-OAuth:
Route::get('/oauth/gmail', function () {
return LaravelGmail::setUserId($userId)->redirect();
});
Create Token file
Route::get('/oauth/gmail/callback', function () {
LaravelGmail::setUserId($userId)->makeToken();
return redirect()->to('/');
});
Tokenfile is now saved here /storage/app/gmail/tokens/gmail-json-$userId.json
Add .json File to your Live-Enviroment
Please set $userId to a id of your choise...
Is it possible to save tokens to a database using Laravel's database drivers? If not, can this be a feature request?