dacastro4 / laravel-gmail

Laravel wrapper for the Gmail API
MIT License
289 stars 133 forks source link

Dacastro4\LaravelGmail\Exceptions\AuthException No credentials found. #240

Open Diel09 opened 1 year ago

Diel09 commented 1 year ago

I have a blank file in the storage/app/gmail/tokens named gmail-json.json i followed the config.php. need help thank you

Diel09 commented 1 year ago

I have this in my index.blade.php and everytime i log in it will proceed but will still display the log in link {{ LaravelGmail::user() }} @if(LaravelGmail::check()) logout @else login @endif

Diel09 commented 1 year ago

Route::get('/oauth/gmail', function (){ return LaravelGmail::redirect(); });

Route::get('/oauth/gmail/callback', function (){ LaravelGmail::makeToken(); return redirect()->to('/'); });

Route::get('/oauth/gmail/logout', function (){ LaravelGmail::logout(); //It returns exception if fails return redirect()->to('/'); });

i have added this in my web.php