An improvement for the Evil Portal (i'm using the esp32_marauder version) is to include a result parameter in the returned redirect page.
This will allow for a "You are now signed in" page to be shown after the sign in process, or to present error messages if the email/password provided is not suitable.
The specific code is below and just needs to include a parameter in the window.location.href:
An improvement for the Evil Portal (i'm using the esp32_marauder version) is to include a result parameter in the returned redirect page.
This will allow for a "You are now signed in" page to be shown after the sign in process, or to present error messages if the email/password provided is not suitable.
The specific code is below and just needs to include a parameter in the window.location.href:
Here are some examples of return results that could be included:
"/?result=success" - This is when the user has provided an email address and password text successfully.
"/?result=email-error" - Do a regex test on the inbound email to check the format. If it's not formatted correctly respond with this error.
"/?result=email-blank" - The email field was blank
"/?result=password-blank" - The password field was blank
"/?result=general-failure" - Any other failure allows for a general error message.
In the index.html file you can use javascript to get these parameters and render a different page in response: