This website uses Cookies. Click Accept to agree to our website's cookie use as described in our Privacy Policy. Click Preferences to customize your cookie settings.
Accept
Reject
Preferences
- Google Cloud
- Google Workspace
- AppSheet
- Google Cloud Security
Turn on suggestions Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Log in to ask a question
- Google Cloud
- Cloud Forums
- Developer Tools
- Re: Regarding google OAuth and Scaling web applica...
Log in to ask a question
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Regarding google OAuth and Scaling web application
Posted on07-24-2023 07:03 AM
varunmukherjee5
Bronze 2
Post Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply posted on--/--/---- --:-- AM
Post Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
Basically I am a newbie who is trying to build some web app/tools on google workspace and I am in need of some serious help.
Context:I am trying to create an application like zapier,where users can signup via OAuth 2.0 so that I can interact with their google servies like calendar, mails etc and provide them services accordingly.
Problem:I want to publish my web app, and before doing that I have a lot of questions and doubts regarding it's scalability :-
1. For testing applicationrefresh tokenexpires in 7 days, so how long will a refresh token last on a published web app ?
2. Can I set custom lifetime for refresh tokens generated via my client id (if yes, how) ?
3. I read that in google OAuth2, at a time it can have only100 refresh tokens in circulation. Then how can I build an application that could cater to 1000-50,000 clients simultaneously where every individual will have his own set of tokens ??
It would be very grateful to anyone who could help me or guide me in right direction.
Solved!Go to Solution.
Solved
03548
Topic Labels
- Labels:
- Cloud Build
- Cloud SDK
- Google Cloud Deploy
1 ACCEPTED SOLUTION
Posted on--/--/---- --:-- AM
Marramirez
Silver 4
In response to varunmukherjee5
Post Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply posted on--/--/---- --:-- AM
Post Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, your unique client-id has a limit of 100 refresh tokens. But if the limit is reached, creating a new token will automatically invalidate the oldest refresh token without any warning.
If you want to scale up, you can use service accounts because they are not affected by the limit of 100 refresh tokens.There is also a larger limit on the total number of refresh tokens a user account or service account can have across all clients
View solution in original post
- View All Topics In this Discussion Space
- Previous Topic
- Next Topic
3 REPLIES 3
Posted on--/--/---- --:-- AM
Marramirez
Silver 4
Post Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply posted on--/--/---- --:-- AM
Post Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello@varunmukherjee5,
Welcome to the Google Cloud Community!
To answer your questions:
- When an application is published, refresh tokens expire indefinitely, there are only a number of reasons why the tokens might expire. Check Refresh Token Expiration to know these reasons.
- You can set a longer expiration time of refresh tokens through Apigee.
- The limit is per user, meaning you can have thousands of users but each user can only have up to 100 refresh token per client ID. See Refresh Token Expiration.
Let me know if it helped, thanks!
Posted on--/--/---- --:-- AM
varunmukherjee5
Bronze 2
In response to Marramirez
Post Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply posted on--/--/---- --:-- AM
Post Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much for you help@Marramirez.
But, can you please elaborate on your 3rd point, basically that's confusing me 😅.
Let me take an example to explain my problem: so let's say I register my web-app for O-Auth2 then I will get a unique 'client-id' and 'client-secret' as credentials. And what I infer from your text is that 'using my client-id and secret I can authorize 100 users (via OAuth2) and issue them refresh tokens'. Since I have only 1 pair of 'client-id and secret' then how can I scale my app for let's say 1000 users ?
Posted on--/--/---- --:-- AM
Marramirez
Silver 4
In response to varunmukherjee5
Post Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply posted on--/--/---- --:-- AM
Post Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, your unique client-id has a limit of 100 refresh tokens. But if the limit is reached, creating a new token will automatically invalidate the oldest refresh token without any warning.
If you want to scale up, you can use service accounts because they are not affected by the limit of 100 refresh tokens.There is also a larger limit on the total number of refresh tokens a user account or service account can have across all clients
Top Labels in this Space
- ABAP SDK17
- API Hub2
- API Security3
- Artifact Registry58
- Cloud Build225
- Cloud Code167
- Cloud SDK244
- Cloud Source Repositories57
- Cloud Workstations45
- Container Registry30
- Developer Portal1
- Google Cloud Deploy216
- Infrastructure as Code38
- Integrated Developer Portal1
- Integration3
- Open Source46
- Terraform21
- User Interface1
- «Previous
- Next»
Top Solution Authors
User | Count |
---|---|
CincyAI513 | 2 |
NoCommandLine | 1 |
John8543855 | 1 |
prerana1016 | 1 |
View all