1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

feat: Max sessions limit (#8765)

This commit is contained in:
Mateusz Kwasniewski 2024-11-15 09:57:17 +01:00 committed by GitHub
parent 5d36862ddb
commit b3437b8c34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View File

@ -80,7 +80,7 @@ const HostedAuth: VFC<IHostedAuthProps> = ({ authDetails, redirect }) => {
setToastData({
type: 'success',
title: 'Maximum Session Limit Reached',
text: `You can have up to ${data.activeSessions} active sessions at a time. To allow this login, weve logged out ${data.deletedSessions} session(s) from other browsers.`,
text: `You can have up to ${data.activeSessions} active sessions at a time. To enhance your account security, weve ended ${data.deletedSessions} session(s) on other browsers.`,
});
}
refetchUser();

View File

@ -47,6 +47,9 @@ test('should show deleted stale sessions info for Password Auth', async () => {
button.click();
await screen.findByText('Maximum Session Limit Reached');
await screen.findByText(
'You can have up to 3 active sessions at a time. To enhance your account security, weve ended 1 session(s) on other browsers.',
);
});
test('should show deleted stale sessions info for Hosted Auth', async () => {
@ -73,4 +76,7 @@ test('should show deleted stale sessions info for Hosted Auth', async () => {
button.click();
await screen.findByText('Maximum Session Limit Reached');
await screen.findByText(
'You can have up to 3 active sessions at a time. To enhance your account security, weve ended 1 session(s) on other browsers.',
);
});

View File

@ -79,7 +79,7 @@ const PasswordAuth: VFC<IPasswordAuthProps> = ({ authDetails, redirect }) => {
setToastData({
type: 'success',
title: 'Maximum Session Limit Reached',
text: `You can have up to ${data.activeSessions} active sessions at a time. To allow this login, weve logged out ${data.deletedSessions} session(s) from other browsers.`,
text: `You can have up to ${data.activeSessions} active sessions at a time. To enhance your account security, weve ended ${data.deletedSessions} session(s) on other browsers.`,
});
}