-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't login with multiple users? #67
Comments
@mcgregorjamie Can you tell me if the file is named |
Yes the file is |
Hopefully, thanks to @nasatome, this issue is solved. |
@dacastro4 Still having the same issue unfortunately :( |
|
|
@mcgregorjamie that may be the problem. Enclose that code inside Route::group(['middleware' => ['auth']], function() {
//
}); |
That has fixed it, thank you so much for all of your help! |
@mcgregorjamie No problem! |
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? |
Can I use the auth middleware for api calls? |
@alalfakawma you should be able to use it with the |
I have tried setting
GOOGLE_ALLOW_MULTITPLE_CREDENTIALS=true
in the env file (and refreshing config cache) as well as hardcoding'allow_multiple_credentials' => true
in config/gmail.php.But when I login as a User A in one browser, then log in as User B in a different browser, I can only see the data for User A. If I take a look at
storage/app/gmail/tokens/
there's only one gmail-json file and when I open it, only the details for User A are in there.I'm sure I'm missing something obvious here, but hoping someone can help!
The text was updated successfully, but these errors were encountered: