Add Suspicious state for detecting unusual session activity
This commit is contained in:
@ -2,6 +2,7 @@ package logoutHandler
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/fossyy/filekeeper/app"
|
||||
"github.com/fossyy/filekeeper/types"
|
||||
"net/http"
|
||||
|
||||
@ -26,12 +27,12 @@ func GET(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
err = storeSession.Delete()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
app.Server.Logger.Error(err)
|
||||
return
|
||||
}
|
||||
err = session.RemoveSessionInfo(userSession.Email, cookie.Value)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
app.Server.Logger.Error(err)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@ func init() {
|
||||
"account_selection_required": "Please select an account to proceed with the request.",
|
||||
"consent_required": "Consent is required to proceed. Please provide consent to continue.",
|
||||
"csrf_token_error": "The CSRF token is missing or invalid. Please refresh the page and try again.",
|
||||
"suspicious_session": "We've detected unusual activity on your account. Please log in again to confirm it's you.",
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user