mirror of
https://github.com/sasjs/adapter.git
synced 2026-07-24 15:12:15 +00:00
test(AuthManager): specs added for redirected login
This commit is contained in:
@@ -31,6 +31,18 @@ export class AuthManager {
|
||||
public async redirectedLogIn({
|
||||
onLoggedOut
|
||||
}: LoginOptions): Promise<LoginResult> {
|
||||
const { isLoggedIn: isLoggedInAlready, userName: currentSessionUsername } =
|
||||
await this.fetchUserName()
|
||||
|
||||
if (isLoggedInAlready) {
|
||||
await this.loginCallback()
|
||||
|
||||
return {
|
||||
isLoggedIn: true,
|
||||
userName: currentSessionUsername
|
||||
}
|
||||
}
|
||||
|
||||
const loginPopup = await openWebPage(
|
||||
this.loginPreventRedirectUrl,
|
||||
'SASLogon',
|
||||
|
||||
Reference in New Issue
Block a user