Renders the user signup/login page if they are not authenticated, otherwise renders the user's profile
- Source:
Methods
(inner) checkForStrongPassword(password)
Checks whether a password is secure: in this case, whether it is at least 8 characters long and contains at least one uppercase letter, lowercase letter and number
Parameters:
Name | Type | Description |
---|---|---|
password |
string | Password to check |
- Source:
Returns:
boolean value of whether or not password is secure
(inner) checkForValidEmail(email)
Checks whether a string is in a valid email format: s1@s2.s3, where s1, s2 and s3 are strings.
Parameters:
Name | Type | Description |
---|---|---|
email |
string | Email string to check |
- Source:
Returns:
boolean value of whether string is a valid email address
(inner) generateModal(header, body)
Shows a pop up modal with a given header and body text
Parameters:
Name | Type | Description |
---|---|---|
header |
string | Header text |
body |
string | Body text |
- Source:
(inner) handleAuthentication()
Handles user authentication: attempts to login with Firebase if client is in login state, otherwise tries to sign them up if password is secure.
- Source: