SteemConnect v2 token expiry date validation proposal

in #utopian-io6 years ago (edited)

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

Sort:  

@olo2552, Upvote is the only thing I can support you.

Thanks for your contribution it has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @olo2552 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.028
BTC 56570.01
ETH 3028.13
USDT 1.00
SBD 2.29