laravel-gmail
laravel-gmail copied to clipboard
LaravelGmail::check() returning null after redirection
Hi there,
I am simply using LaravelGmail::makeToken() and then redirecting is to inbox dashboard.
What happening is after successful login I have action in my controller
public function gmailCallback() {
LaravelGmail::makeToken();
LaravelGmail::check(); // here it is returning true
return redirect()->route('dashboard');
}
Here is my action dashboard which is linked with route name dashboard
public function dashboard() {
LaravelGmail::check(); // here it is false
}
UPDATE: The token is not getting saved in /storage/app/gmail/tokens/gmail-json.json The permission I set is using below command:
sudo chmod -R 775 storage
sudo chown -R abhimanu:www-data storage
PS: Also I think this package only works for single user, what if another user login using same CRM, will the first user logged out automatically from the system? What if multiple users are logging in at the same time?
Please try to add \ before LaravelGmail like this \LaravelGmail
@cntabana Its all because of its token saving strategy. I think this package should provide migration to save config and token in database instead of json file. So that in app ajax call will not effect its working.
You might be right. Sounds like a good feature to have.