Compare commits

..

2 Commits

Author SHA1 Message Date
Alex
60a12c97be removed password logging 2025-03-02 23:28:54 +01:00
Alex
bb56d1f7c7 fix: login redirect 2025-03-02 23:28:45 +01:00
3 changed files with 3 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ export const actions = {
} }
} }
console.log('Redirecting to:', next || `${base}/auth/about/${responseBody.user.id}`); console.log('Redirecting to:', next || `${base}/auth/about/${responseBody.user_id}`);
throw redirect(303, next || `${base}/auth/about/${responseBody.user.id}`); throw redirect(303, next || `${base}/auth/about/${responseBody.user_id}`);
} }
}; };

View File

@@ -249,6 +249,7 @@ func (uc *UserController) LoginHandler(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{ c.JSON(http.StatusOK, gin.H{
"message": "Login successful", "message": "Login successful",
"user_id": user.ID,
}) })
} }

View File

@@ -1,7 +1,6 @@
package models package models
import ( import (
"GoMembership/pkg/logger"
"fmt" "fmt"
"time" "time"
@@ -67,7 +66,6 @@ func (u *User) SetPassword(plaintextPassword string) error {
} }
func (u *User) PasswordMatches(plaintextPassword string) (bool, error) { func (u *User) PasswordMatches(plaintextPassword string) (bool, error) {
logger.Error.Printf("plaintext: %v user password: %v", plaintextPassword, u.Password)
return argon2id.ComparePasswordAndHash(plaintextPassword, u.Password) return argon2id.ComparePasswordAndHash(plaintextPassword, u.Password)
} }