-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Hi, can someone please give me some pointers on how this can work with multiple users?
The aim of my project is to access my users' accounts and do something on their behalf. If I'm understanding this right(please correct me if I'm wrong), I create an OAuth2Client with my project's client id, client secret and redirect url, then with this OAuth2Client I generate an auth url which my users will access to give permission and an auth code per user will be returned to my redirect url. How do I identify which user's auth code is returned? Also once I have received all my users' access and refresh tokens, how do I refresh multiple users' access tokens? There is the method OAuth2Client.setCredentials which allows me to set the refresh token of a single user, and with an event listener I can get a new access token when the previous expired, but how do I use setCredentials for each refresh tokens of all my users?
Any help will be much appreciated, thanks in advance!