-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Validate password * Return conflict response when email is not unique * Improve login errors * Update tests after login-signup changes * Add login skeleton * Draft signup page * Fix-me * Submit login * Redirect to activation page after signup * Draft google login * Make login working * Add session context * Implement fetch hook and session context * Add backend function to retrieve current user * Complete login flow
- Loading branch information
Showing
20 changed files
with
537 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,8 +37,8 @@ func (ut *userTest) getUserOK(t *testing.T) user.User { | |
usr, err := Signup(ut.Server, user.UserSignup{ | ||
Name: "Paolo Calao", | ||
Email: "[email protected]", | ||
Password: "pass", | ||
PasswordConfirm: "pass", | ||
Password: "pass12345678", | ||
PasswordConfirm: "pass12345678", | ||
}) | ||
|
||
if err != nil { | ||
|
@@ -49,7 +49,7 @@ func (ut *userTest) getUserOK(t *testing.T) user.User { | |
t.Fatal(err) | ||
} | ||
|
||
if err := Login(ut.Server, "[email protected]", "pass"); err != nil { | ||
if err := Login(ut.Server, "[email protected]", "pass12345678"); err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
|
@@ -285,7 +285,7 @@ func (ut *userTest) createUserExistent(t *testing.T) { | |
} | ||
defer w.Body.Close() | ||
|
||
if w.StatusCode != http.StatusBadRequest { | ||
if w.StatusCode != http.StatusConflict { | ||
t.Fatal("cannot create already existing user") | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.