mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-16 00:20:06 +00:00
fix(*): fix login issue
This commit is contained in:
@@ -1151,7 +1151,7 @@ export default class SASjs {
|
|||||||
this.csrfTokenApi = csrfToken
|
this.csrfTokenApi = csrfToken
|
||||||
}
|
}
|
||||||
|
|
||||||
private async resendWaitingRequests() {
|
private resendWaitingRequests = async () => {
|
||||||
for (const sasjsWaitingRequest of this.sasjsWaitingRequests) {
|
for (const sasjsWaitingRequest of this.sasjsWaitingRequests) {
|
||||||
this.request(sasjsWaitingRequest.SASjob, sasjsWaitingRequest.data).then(
|
this.request(sasjsWaitingRequest.SASjob, sasjsWaitingRequest.data).then(
|
||||||
(res: any) => {
|
(res: any) => {
|
||||||
|
|||||||
@@ -91,7 +91,10 @@ export class AuthManager {
|
|||||||
*/
|
*/
|
||||||
public async checkSession() {
|
public async checkSession() {
|
||||||
const loginResponse = await axios.get(this.loginUrl.replace('.do', ''), {
|
const loginResponse = await axios.get(this.loginUrl.replace('.do', ''), {
|
||||||
responseType: 'text'
|
responseType: 'text',
|
||||||
|
headers: {
|
||||||
|
Accept: '*/*'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const responseText = await loginResponse.data
|
const responseText = await loginResponse.data
|
||||||
const isLoggedIn = /<button.+onClick.+logout/gm.test(responseText)
|
const isLoggedIn = /<button.+onClick.+logout/gm.test(responseText)
|
||||||
|
|||||||
Reference in New Issue
Block a user