mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
feat: add auth session limit param
This commit is contained in:
@@ -114,6 +114,12 @@ class Project extends Model
|
||||
'default' => 0,
|
||||
'example' => 100,
|
||||
])
|
||||
->addRule('authSessionsLimit', [
|
||||
'type' => self::TYPE_INTEGER,
|
||||
'description' => 'Max sessions allowed per user. 100 maximum.',
|
||||
'default' => 100,
|
||||
'example' => 10,
|
||||
])
|
||||
->addRule('providers', [
|
||||
'type' => Response::MODEL_PROVIDER,
|
||||
'description' => 'List of Providers.',
|
||||
@@ -233,6 +239,7 @@ class Project extends Model
|
||||
|
||||
$document->setAttribute('authLimit', $authValues['limit'] ?? 0);
|
||||
$document->setAttribute('authDuration', $authValues['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG);
|
||||
$document->setAttribute('authSessionLimit', $authValues['maxSessions'] ?? APP_LIMIT_USER_SESSIONS);
|
||||
|
||||
foreach ($auth as $index => $method) {
|
||||
$key = $method['key'];
|
||||
|
||||
Reference in New Issue
Block a user