mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-18 01:20:05 +00:00
feat(auth): added multi-language support to logIn method
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { delay } from '../utils'
|
||||
import { enLoginSuccessHeader } from './AuthManager'
|
||||
|
||||
export async function verifySasViyaLogin(loginPopup: Window): Promise<{
|
||||
isLoggedIn: boolean
|
||||
@@ -20,9 +21,7 @@ export async function verifySasViyaLogin(loginPopup: Window): Promise<{
|
||||
if (loginPopup.closed) break
|
||||
isAuthorized =
|
||||
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 (!isAuthorized && elapsedSeconds < 5 * 60)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user