solid-ui icon indicating copy to clipboard operation
solid-ui copied to clipboard

Provide default UX for logging in when server responds 401

Open timbl opened this issue 5 years ago • 1 comments

We have lots of login panels, but at the moment there are many cases in which the mashlib code puts a 401 error message into a status panel. It shouldn't really do that without giving the user a button to log in.

This needs to be coordinated with the 401 handling which the client or its successor does.

Possible solutions are for the developer to optionally pass in a place in the the DOM real estate which can be used for this. It could probably be used for 403 handling also, and other error displays.

timbl avatar Feb 28 '20 21:02 timbl

Example user story

  • User starts to use a solid-ui based app without having logged in
  • The developer didn't put in UX code to require the user to log in
  • The server rejects a fetch with a 401
  • solid-ui sees there is provision for the login button, and so creates one of its own.
  • the user is prompted to log in or sign up
  • The user gets a first solid account and then the JUI collapses back to the login button
  • The users presses the 'login' button and logs in
  • The fetch() is retried and succeeds.
  • The app continues where it left off

timbl avatar Feb 28 '20 21:02 timbl