Signup and login: NodeJS
This section dives into login and signup for the system
Similar in design, the mobile and browser frontend clients do not differ too drastically. The only difference between the two is the method of storing the JWT token.
Mobile Frontend: Configuring login and signup with Swift
Signing Up
Video Location: [Mobile Frontend Video URL]
On the mobile app, users are greeted with a user-friendly signup screen. Fields for essential information like email, username, and password are presented intuitively.
The frontend communicates with our Node.js and TypeScript-based User API. The provided user details are sent over a secure connection.
The backend ensures that the provided data meets our validation rules. Passwords are securely hashed and stored.
On successful signup, users are greated with a success message and routed to the home page. If not, specific error messages guide the user in correcting their input.
Logging In
Users enter their login credentials β either email or username along with their password.
The app connects with our User API, sending over the login details.
The backend verifies the credentials against stored data, and upon successful authentication, generates a JSON Web Token (JWT) for secure access.
The JWT is sent back to the app, where it's securely stored for future API requests.
Browser Frontend: TypeScript and React
Signing Up
Video Location: [Browser Frontend Video URL]
The web interface offers a clean signup form, mirroring the mobile experience. Users input their desired credentials.
Similar to the mobile flow, the browser frontend communicates with our User API for signup data submission.
The backend validates and processes the received data, ensuring consistency and adhering to our defined rules.
Users are informed of their successful signup or guided through error resolution if issues arise.
Logging In
Users access the login page and provide their credentials β email or username and password.
Just as during signup, the backend performs thorough validation of the received data.
The backend verifies the credentials, and upon successful validation, issues a JWT for secure interactions.
The web app stores the JWT locally (such as in a cookie or local storage) for subsequent API communication.
Last updated