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:
- 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.
- 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:
- It is the only solution for third-party server to check how long token will be valid
- 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
@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
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
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