Skip to content

How to make this library work with multiple user accounts?Β #2080

@ParadisusParadoxum0000

Description

@ParadisusParadoxum0000

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!

Metadata

Metadata

Assignees

Labels

needs more infoThis issue needs more information from the customer to proceed.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions