ledgerconnect/steemconnect

[Feature] Option to redirect immediatelly from authorize screen

Closed this issue · 6 comments

After successful authorization there's currently a 10 second mandatory timeout before page redirects back to redirect_uri. Add a url parameter to skip the waiting, and redirect immediately.

What's the point? What's the problem you are trying to solve?

Reliability of the process.

Users can navigate away from the screen during the mandatory 10s timeout making it unreliable to use as part of any authorization process. By redirecting immediately with success / failure status you can let the client application inform the user and take next steps if necessary.

In our particular use case, the authorize screen sits in a popup. Once the authorization is complete, we redirect back to a specific url on our website, which then closes the popup window, fetches changes and refreshes the user's view.

If there's a time gap where users can close the popup window, they will get stuck with stale UI. We have no way of knowing if they completed the authorization step without ugly hacks.

@pauliusuza We an user broadcast an operation he should be able to get confirmation and have time to read it, that would not be possible if we remove the 10sec timeout. Even if we remove the 10sec before the redirection, user could close the page before redirection. There is no garantee that the user will comeback to your site, it's anyhow a behavior that your app should handle.

We are not looking for perfect solution, but at least let's try to fix the obvious. Having that timeout feels like a bug from UX perspective, and it increases likehood of users getting stuck in stale state.

Also consider that sometimes no broadcast is made at all, for example when user tries to authorize an account he already has given authorization to, then popup is just unnecessary delay.

We should have the option to display the feedback to the user ourselves, once they are redirected to redirect_url, and you could pass any status or broadcast transaction id as a parameter to redirect_url, you don't need to make it default, just add a parameter so we can choose to display 10s timeout on steemconnect or redirect immediately.

Tested and works great! thank you