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:
parent
5d36862ddb
commit
b3437b8c34
@ -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, we’ve 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, we’ve ended ${data.deletedSessions} session(s) on other browsers.`,
|
||||
});
|
||||
}
|
||||
refetchUser();
|
||||
|
@ -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, we’ve 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, we’ve ended 1 session(s) on other browsers.',
|
||||
);
|
||||
});
|
||||
|
@ -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, we’ve 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, we’ve ended ${data.deletedSessions} session(s) on other browsers.`,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user