feat(security): #328 delete old sessions [tbs]
Some checks failed
Build Docker Image / Build-Docker-Image (push) Failing after 42s
Some checks failed
Build Docker Image / Build-Docker-Image (push) Failing after 42s
This commit is contained in:
@@ -95,6 +95,7 @@ func NewAuthImpl(db db.Auth, random Random, clock Clock, mail Mail, serverSettin
|
||||
}
|
||||
|
||||
func (service AuthImpl) SignIn(email string, password string) (*Session, error) {
|
||||
log.Info("Sign in %s", email)
|
||||
user, err := service.db.GetUserByEmail(email)
|
||||
if err != nil {
|
||||
if errors.Is(err, db.ErrNotFound) {
|
||||
@@ -148,6 +149,7 @@ func (service AuthImpl) SignInSession(sessionId string) (*Session, error) {
|
||||
}
|
||||
|
||||
func (service AuthImpl) SignInAnonymous() (*Session, error) {
|
||||
log.Info("Sign in anonymous")
|
||||
sessionDb, err := service.createSession(uuid.Nil)
|
||||
if err != nil {
|
||||
return nil, types.ErrInternal
|
||||
|
||||
Reference in New Issue
Block a user