How do you want to validate the existence of the validity of the email
-> I've never done this before but I normally see websites send a link to the email and when that link is clicked the account would then be verified. I assume part of that link would be a token stored in the database that is related to the user account.
What is your reset password flow?
-> Also never done this before but I assume it would be something like this:
User clicks forgot password -> User enters email address for account -> A reset password token gets generated that is tied to the user account with the email that was entered previously -> a link is sent to the users email for eg www.somsite.com/resetpassword/<token-that-was-generated> -> User resets password successfully -> User gets redirected to the login page
JWTs or Sessions?
-> I've used JWT in the pass and stored the token in local storage, but thats not safe due to XSS, so I've been learning about session lately and this is what I understand from it
<image attached>
Do you want to allow for refreshing the current session?
Mhmm, I dont see where this would be applicable in my current use case but I'm not sure if this will be needed in the future