advweb-grp1 / advanced-web-final-year-project

Final year advanced web develop unit project
MIT License
1 stars 0 forks source link

Feature/register #34

Closed AymanReh closed 1 year ago

AymanReh commented 1 year ago

Added 6 text boxes to registerview.vue (Name, address, phone number, institutional affiliation, email and password) when all data is entered sends email and password to firebase auth, creates a document inside of user with Name, address, phone number, institutional affiliation, email and password.

There is validation for each field to make sure that they are entered, emails must contain an @ symbol, passwords must be 6 or more characters wrong, firebase set this rule I had no control over it but it adds further validation and phone numbers must start with a + and only contain numbers.

I have also added unit tests to validate the register page such as phone numbers cannot be empty, phone numbers must have the right format, making sure the page renders correctly, making sure each text box cannot be submitted empty.

I have edited database.js inside of the firebase folder to import addDoc, collection from firebase/firestore and createUserWithEmailAndPassword from firebase/auth. I have also exported them so that i can use them inside of registerview.vue.

AymanReh commented 1 year ago

It failed the test. Gives auth/invalid-api-key, could mean it is unable to connect to the group firebase. Since authenticating with my personal firebase it does not give this error.

AymanReh commented 1 year ago

Still getting the api/key error. Will work once correct api/key is in main

github-actions[bot] commented 1 year ago

Visit the preview URL for this PR (updated for commit 1ca2d4c):

https://adv-web-grp1--pr34-feature-register-gs7m1pvp.web.app

(expires Fri, 21 Apr 2023 21:54:19 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e45f8bd17b7de44787580bea572e36aa09784b8c