oauth - How to handle authorizing the same third-party application multiple times for a single user account? -


i'm working on cloud-storage api, authorized via oauth. users of third-party applications can permit said application access files/data via our restful api.

currently, limiting third-party app access users account once. e.g., access token table has unique on consumer column , user column. makes sense @ first glance, user should never sent our service authorize third-party application twice, since third-party know user tied our service , wouldn't need re-authorized.

however, if user has 2 accounts on third-party app, , want said app connect single account on our service twice? seems likely, given prevalence of multiple accounts on services such reddit.

here possible solutions i've come far, none of them being perfect:

  • display error during second auth request: seems frustrating experience user, "cop out" of sorts.
  • delete previous token: annoy user, previous accounts stop working. if display warning, hard explain happening.
  • return same access token first request: each time access requested, set of permissions passed along. permissions second request different permissions first request. also, not sure if violate oauth spec, secondly generated request token isn't tied access token properly.
  • allow 2 generated: confusing, when user visits screen full of authorized applications revoke one, don't know authorization tied third-party account. ask optional third-party username parameter when request token generated identify different auth's (we ask non-oauth-standard permission parameter already). but, seems wouldn't used 99% of developers , make application development more confusing.

what best way handle situation? there standardized practice handling use-case?

i think last case right way go - allow 2 generated

when user visits screen full of authorized application, it's not necessary show him 1 , same application twice - have delete tokens associated app if user revokes application access. is, authorizations app tokens go away revoke, fine.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -