Comments (12)
@mcgregorjamie Can you tell me if the file is named gmail-json-
?
from laravel-gmail.
Yes the file is gmail-json.json
from laravel-gmail.
Hopefully, thanks to @nasatome, this issue is solved.
from laravel-gmail.
@dacastro4 Still having the same issue unfortunately :(
from laravel-gmail.
- did you log in before changing
allow_multiple_credentials
to true? if so, try to removing the file and trying it again. - Is the route where you have all the user information inside of a group with the
auth
middleware?
from laravel-gmail.
- I've tried removing the file but the same thing happens.
- Sorry, not sure I understand. Which route needs to be inside a group with the
auth
middleware? I followed the readme.md so my routes look like this:
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('/');
});
from laravel-gmail.
@mcgregorjamie that may be the problem. Enclose that code inside
Route::group(['middleware' => ['auth']], function() {
//
});
from laravel-gmail.
That has fixed it, thank you so much for all of your help!
from laravel-gmail.
@mcgregorjamie No problem!
from laravel-gmail.
Sorry to open this problem again, but I think we should put in the documentation that to use multiple users, the user should be logged in with laravel previously (since the user's id is used to save the json)
I was thinking of some method of using multiple users without needing the user ID (which is standard and repeatable) but I can not think of any at this time, and in the current state of laravel-gmail to throw an error if the person has enabled in true "allow_multiple_credentials" and the user is not logged.
Allowing multiple users to be used without the user being logged in (using an id, such as the person's email but hashed SHA-2 + algorithm to avoid collisions) would allow oauth2.0 to even be used as a system login and completely replace the use of other plugins such as "Laravel Socialite" for particular uses of Google
I do not know, they are just crazy ideas in my mind.
going back to the starting point, for now, @dacastro4 , what do you think of the action of placing in the documentation that it is necessary for the user to be authenticated with laravel in order for the multiple credentials to work?
from laravel-gmail.
@mcgregorjamie that may be the problem. Enclose that code inside
Route::group(['middleware' => ['auth']], function() { // });
Can I use the auth middleware for api calls?
from laravel-gmail.
@alalfakawma you should be able to use it with the auth:api
middleware
from laravel-gmail.
Related Issues (20)
- Multi-user Login
- If messages are null in all() method error generated HOT 1
- getHeader case sensitive
- setWatch() not working HOT 3
- Bug in last version v6.0
- Version 6.1 is not published HOT 1
- Destination email must be specified in cc and bcc HOT 3
- Need to specify the cc and bcc every time i need to send an email HOT 5
- production.ERROR: refresh token must be passed in or set as part of setAccessToken {"userId":1,"exception":"[object] (LogicException(code: 0): refresh token must be passed in or set as part of setAccessToken at /home/forge/website/vendor/google/apiclient/src/Client.php:332) HOT 2
- Getting error while replying to email HOT 4
- Send Email BCC not working
- Get signature of the user
- Enable function for application wide access
- I have got issue in php version 8.1 Is it available for PHP version 8.1 or laravel10? HOT 2
- Error 400: redirect_uri_mismatch
- refresh token must be passed in or set as part of setaccesstoken HOT 2
- An address can be an instance of Address or a string ("array" given).
- Not supported for Laravel 10 HOT 3
- Multiple user login not working HOT 3
- Hello HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-gmail.