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

  • Home
  • SEARCH
  • 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 3631356
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:23:12+00:00 2026-05-19T00:23:12+00:00

I asked various questions about my problem ( here and here ) and I

  • 0

I asked various questions about my problem (here and here) and I also asked in the #oauth & #openid freenode’s channel on IRC. (this is note an “UP” question, it’s an other problem)

I’ll sum up my project configuration : Anyone will have the possibility to create an app that can use my API. To start, I’ll work on my API and a Web based app, but the documentation about the API will be public. It’s a bit like Twitter API.

The problem I face is how can I be sure which user is using the API (to retrieve his personal data, like your tweets), even if the User is using an app that I don’t know who make it (again, like twitter and all the apps around).

I googled a lot and with the help of the previous answers given, I took a look at OAuth.

As far as I understood the way OAuth works, here how :

  • A user visit an app that use my API (web, mobile, whatever)
  • The apps redirect the user to the API for the authentication (I’ll use OpenId) and the authorization (OAuth). This is a bit odd since the API will have a web interface for the login and the authorization (I suppose this is how it works since Twitter do that)
  • The API redirect the connected user to the app, with some tokens. In these tokens, there is a token representing the user that the app must store in order to indicate to the API which user is using it currently (Am I correct?)

So far, everything goes well. But what I can’t figure it out, is when the user quit the app and goes again : how the app can remember the user is the one that used it before ?

(Before some of you bring me the cookie answer, I’ll remark this is a simple example, it would be the same if the user clear his cookies, format his computer or change its computer.)

The only solution I can find, is when an unauthenticated user (without a remembering cookie for example) goes to the app, the app redirect him again to the API to authenticate himself, but this time, the user won’t have to re-allow the app (authorization) since it already did it. The API will then return the user to the app to allow him to play with this.

Is this the proper & secure way to do it ?

The #OAuth IRC channel told me about the new protocol, WebID, but this is currently in pre-draft mode and I don’t want to use something that will change continuously in the future :/

Thank you very much for your help!

  • 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-05-19T00:23:13+00:00Added an answer on May 19, 2026 at 12:23 am

    if we take a look at how Twitter works, I think the missing point is an other layer to the project: The Official website:

    alt text

    The thing is, when you want to allow any 3rd party application to use Twitter, this application redirect you to the OAuth page of the Twitter API, IF you are connected, but if you aren’t, it redirect you to the login page, which is located at http://api.twitter.com/login
    (I don’t know if keeping the api in api.twitter.com for loging an user, instead of just twitter.com is correct, but this is just semantics)

    So, the workflow would be:

    • A user goes to a 3rd party application (like a website)
    • This third party redirect the user to the API for Authorization
    • The API redirect the User to the website for Authentication first
    • The official website redirect the User to the OpenId provider (or Facebook connect)
    • The Authentication is made (via multiple requests)
    • The website redirect the user to the API after he’s successfully authenticated
    • The user allow/disallow the permissions asked by the 3rd party apps
    • The API returns to the 3rd party apps.
    • The User can now use (or not) the application.

    This implementation have 2 problems:

    • Every time an User ins’t authenticated (cleared it’s cookies, connect himself from an other computer, etc), he will have to go through the Authentication method, by being redirected to the Official website and then being redirected to the 3rd party application (the API would be transparent, since it has already allowed the application to access his data).
    • All those layers would certainly lost the User on the Authentication process with too many redirections.
    • A possible solution would be to store the user’s access_token, for example in the case of a mobile app, but with a pure html/css/js oriented app, this isn’t possible. A login/password in the 3rd party web application that would match the user to the access_token of the API would be an other solution, like Seesmic (I think), but this is just useless (for us, not Seesmic) : the idea of not having the user’s password become useless.

    This is a possible explanation but I would require more details on how this is possible and your thought about that solution. Would it work?

    (I added this as an answer since it’s an (incomplete and not so sure, I agree) one.

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

Sidebar

Related Questions

I asked this question before, Here however I think I presented the problem poorly,
In a previous question, I asked about various ORM libraries. It turns out Kohana
I asked here about a protocol that I was asked to implement, and how
I was asked this question in an interview and I gave various solutions but
I understand this question has been asked multiple times on various sites and forums
This question is a follow on from the one that was asked here .
I asked a couple of coworkers about AnkhSVN and neither one of them was
(I asked this question in another way , and got some interesting responses but
I asked before about pixel-pushing, and have now managed to get far enough to
Someone asked me a question via e-mail about integer partitions the other day (as

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.