alan-turing-institute / AssurancePlatform

Project to facilitate creation of Assurance Cases
MIT License
19 stars 6 forks source link

[BUG] Sign-up is not working #615

Open chrisdburr opened 1 day ago

chrisdburr commented 1 day ago

We ran an event on Thursday, where one of the CTAs was to sign-up to the TEA platform. Just checked to see if there was a reason why no one has done this and it seems the sign-up form is not working.

You can't use GitHub, Google, or Email.

Please can we do the following:

  1. Push an urgent fix for the email option.
  2. Investigate the GH authentication. I think this is already being looked at.
  3. Remove the Google option until we have this as a live option.

Looping in @aranas for reference only.

cptanalatriste commented 1 day ago

@chrisdburr we're aware GitHub authentication is not working in Prod. @RichGriff is working on that.

Google Auth has been removed from the frontend already . @RichGriff , is still visible in the sign-up form.

I'll look into the registration bug. I'll be posting updates here.

cptanalatriste commented 1 day ago

@chrisdburr I was able to replicate the error when using spaces in the username. Without them, user creation was fine. Can you confirm this is the issue?

@RichGriff , when using spaces in the username, the server returns BAD REQUEST and an error message. Maybe we can show this to the user? Currently, there's no feedback that something went wrong:

image

chrisdburr commented 1 day ago

Thanks @cptanalatriste.

I can confirm the following:

username: fakeuser
email: fakeuser@fakemail.com
password: password123

This was not accepted, but no feedback was given.

I then tried the following, which worked, but note that it is showing that I signed up with GH, which is not accurate.

Screenshot 2024-09-23 at 11 18 54
RichGriff commented 1 day ago

I will remove the google and gh options on the sign up as these should really only be on the sign in, as this process in fact 'signs them up' if they dont currently have an account.

RichGriff commented 1 day ago

Github authentication works in staging, so im assuming this will be resolved when pushed into prod

RichGriff commented 1 day ago

I have added form validation for the username field

Screenshot 2024-09-23 at 13 08 58
RichGriff commented 1 day ago

The way validation form errors were being handled based on the backend repsonse, wasnt great. So I have added form validation before the submit function is called. Meaning that users have to enter valid details and get a better response.

Screenshot 2024-09-23 at 13 27 13
RichGriff commented 1 day ago

@chrisdburr @cptanalatriste I cant seem to replicate the other issue, where it picked up chris's email as a GH account. I just registered with a new username and random email and the settings so me as a non GH account

Screenshot 2024-09-23 at 13 30 39
chrisdburr commented 1 day ago

@chrisdburr @cptanalatriste I cant seem to replicate the other issue, where it picked up chris's email as a GH account.

Hmmm. Odd. I'll do some further testing to see if I can uncover what was going on here.

As for the frontend changes, this is great and should catch most of the issues. Thanks, @RichGriff.

@cptanalatriste, could we look to bring these changes from staging into prod as a priority?

cptanalatriste commented 1 day ago

@chrisdburr , I did the deployment to prod, and it seems to be working now (user validation and GitHub login). Thanks @RichGriff for the fix!

Can you give it a try @chrisdburr ? And if it's working, feel free to close the issue