Closed Kamirus closed 4 years ago
We can also think about:
GET: /password-change -> password form: old password & new1 & new2 POST: /password-change -> check failure -> password form: ... POST: /password-change -> check success -> OnSuccessfulPasswordChange ..
Form representation and validation is a separate topic which we are going to explore soon too :-)
We can say that initial prototyping phase is behind us:
https://github.com/purescript-webrow/webrow/tree/master/src/WebRow/Applets
/login -> login form: email & password
/login?email&password -> check success -> create session -> OnSuccessfulLogin (Response -> Response) HTTPure.Response set cookie redirect login successful ()
/login?email&password -> check failure -> response LoginFailed
loginRequired - check whether the user is logged in
/logout - similarly to the OnSuccessfulLogin remove cookie