olo2552 avatar

SteemConnect v2 token expiry date validation proposal

olo2552

Published: 26 Jan 2018 › Updated: 26 Jan 2018SteemConnect v2 token expiry date validation proposal

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

Leave SteemConnect v2 token expiry date validation proposal to:

Written by

Programistyczny świr / Programming nut

Read more #utopian-io posts


Best Posts From olo2552

We have not curated any of olo2552's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From olo2552