1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-16 00:20:06 +00:00

feat(auth): added multi-language support to logIn method

This commit is contained in:
Yury
2024-06-20 17:15:05 +03:00
parent 4c4511913c
commit 053b07769a
9 changed files with 169 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
import { delay } from '../utils'
import { enLoginSuccessHeader } from './AuthManager'
export async function verifySas9Login(loginPopup: Window): Promise<{
isLoggedIn: boolean
@@ -12,7 +13,7 @@ export async function verifySas9Login(loginPopup: Window): Promise<{
isLoggedIn =
loginPopup.window.location.href.includes('SASLogon') &&
loginPopup.window.document.body.innerText.includes('You have signed in.')
loginPopup.window.document.body.innerText.includes(enLoginSuccessHeader)
elapsedSeconds = (new Date().valueOf() - startTime.valueOf()) / 1000
} while (!isLoggedIn && elapsedSeconds < 5 * 60)