Registration Process:
Start
name = input()
email = input()
password = input()
if name && email && password is invalid:
return 400 error
user = find user with email
if user found:
return 400 error
hash = hash password
user = save name, email, hash to user model
return 201
End
Login Process:
Start
email = input()
password = input()
user = find user with email
if user not found:
return 400 error
if password not equal to user hash:
return 400 error
token = generate token using user
return token
End
Progress:
Follow this link to check the progress
Source Code
Click Here
Class Overview: Lecture 13