-
Notifications
You must be signed in to change notification settings - Fork 23
Improve handling of initial Masterbase auth #150
Description
When first connecting to the Masterbase, it would be beneficial to ensure the accuracy of the output and internal state. Currently, it may display "Successfully authenticated with the Masterbase" even when that's not the case (for example, the Masterbase URL configured returning a 404 due to being an inactive ngrok tunnel).
I suggest we improve the authentication process to confirm a working connection. This means waiting for an appropriate response from the Masterbase before considering authentication successful.
Additionally, it would be helpful to prevent subsequent connection attempts, such as trying to open sessions or upload data, until successful authentication is achieved. This will streamline the process and provide a better experience by avoiding unnecessary errors.
Also: it might be good to communicate the Masterbase connection status to the UI. For users with configured keys, a message like "Unable to connect: This match will not be uploaded to the Masterbase" when connection is unsuccessful or a session can't be opened could be a good idea.