Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8110977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:56:43+00:00 2026-06-06T01:56:43+00:00

Ok, I really know what is it. I work with Facebook/Twitter API long ago.

  • 0

Ok, I really know what is it. I work with Facebook/Twitter API long ago. And it works, there is no bugs, sorry :). However, the following thing haunts me.

What is a token from OAuth provider side? I see token from client side only. But there is one interesting thing. It’s easy to understand.

By default the token I recieve is limited in time. However, when I request an API with offline acces the token I recieve will work eternally with no time limits. Should the token be stored in OAuth provider database in this way? If so, what prevents users to generate milliards of tokens? What if there are a lot of tokens and all of them are stored in database with no time limits? Database then becomes a trash heap. Is this a true way?

I have two assumptions of how tokens are stored:

  1. Token is a simple id for the set of the access rights assign to it, each token being stored on OAuth provider side.

  2. The token is an independent concept. The access rights is being encrypted and packed into the token and then being decrypted on the provider side. Th token lifetime is also packed into it

The second question. What is the best way to store tokens if I’ll want develop my own OAuth provider?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:56:44+00:00Added an answer on June 6, 2026 at 1:56 am

    The OAuth token is just an ID and doesn’t contain any information. In fact, it would not be good if the token contained real information because that would make it easier to hack. The provider associates that token with your application account and stores any information they need in their own database. I don’t know about Facebook, but Twitter OAuth tokens don’t expire unless the owner regenerates them.

    When you’re doing OAuth, you’ll know who the user is that is working with your program and have your own database table for holding user data. On the user’s first OAuth authentication, grab their credentials and save them in your database. Then, on every subsequent query you make to the service (i.e. Twitter) reload those credentials so that the user doesn’t have to authenticate all over again. If a query with current credentials fails, you might want to re-authenticate and save the new credentials – in case the old credentials expired for some reason. This way, you only have OAuth tokens for each user in your system and you manage the lifetime of that user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there's a Graph api url for getting the recent wall feeds: https://graph.facebook.com/me/feed?access_token=...
i didn't really know how to title this question, but here's a thing that
I don't really know much about the capability of the different OSs. However, I
This is something I should really know, but I haven't done any db work
I don't really know math well beyond Algebra 1, however I can usually hack
I don't really know how to decribe this problem, so I'm sorry if the
I don't really know much about sockets except how to read and write to
I never really know what order is the best installation or if it even
i don't really know what ruby,gems, or ror is, my objective is make this
Don't really know how to formulate the title, but it should be pretty obvious

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.