4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

SteemConnect v2 token expiry date validation proposal

This post is extension of currently open issue on github (issue #38): https://github.com/steemit/sc2-sdk/issues/38

Components

The problem is connected with providing a better and more complex information of authenticated user, which is heavily supportive for application based on SteemConnect v2, but needs own third-party backend solution

Proposal

My proposal is explained in the issue description - for TL:DR I can say, that the problem is, that there is no 100% safe way to check, when user's token becomes expired and it provedes big authentication problem.

Mockups / Examples

The example isn't so formed yet, repasting my proposal from the issue, I think that there is two possible solutions for the problem:

  1. SDK.me() endpoint could be extended with token expiry date & username. That way third-party server could have reliable source of information without much effort.
  2. Making SDK.validate() endpoint, where when provided a valid username and token API returns the information about token epiry date & scopes without entire user information blob.
    Although, that way is harder to make and maintain, it has a lot of advantages. Firstly, the SC2 server would not be so stressed - every .me() request just for validation would be replaced with much lighter payload. Secondly, it solves authentication problem, while providing faster solution for both client and server

Benefits

Benefits are also listed on the issue, but providing TL:DR:

  1. It is the only solution for third-party server to check how long token will be valid
  2. Providing other endpoint would improve SC2 server usage by redusing stress. New endpoint would have much lighter payload.



Posted on Utopian.io - Rewarding Open Source Contributors

8 upvotes $1.53

Replies (3)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: