silverstripe / silverstripe-mfa

MultiFactor Authentication for Silverstripe CMS
BSD 3-Clause "New" or "Revised" License
11 stars 24 forks source link

Unexpected responses leave just loading spinner showing #431

Open matt-in-a-hat opened 3 years ago

matt-in-a-hat commented 3 years ago

If the server returns an error when loading then no error is shown and the spinner just remains. E.g. if it sends a request to /Security/changepassword/mfa/login/totp but that request returns <h1>429 - Too many requests</h1> (if you've hit the Security controller too much in a period), it has the console error SyntaxError: Unexpected token <.

Ideally this would display something to the user, even if it's "An error occurred, please refresh"

Using silverstripe/mfa:4.2.2 and silverstripe/totp-authenticator:4.1.1

brynwhyman commented 3 years ago

Hmm, sounds like this might be a follow on issue since this PR was implemented: https://github.com/silverstripe/silverstripe-mfa/pull/401