1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-08 13:00:05 +00:00

feat(login): add redirected login mechanism

This commit is contained in:
Krishna Acondy
2021-08-21 21:36:50 +01:00
parent 4f62cd0148
commit 830a907bd1
6 changed files with 71 additions and 8 deletions

View File

@@ -4,7 +4,7 @@ import { getTokens } from '../../auth/getTokens'
import { RequestClient } from '../../request/RequestClient'
import { JobStatePollError } from '../../types/errors'
import { Link, WriteStream } from '../../types'
import { isNode } from '../../utils'
import { delay, isNode } from '../../utils'
export async function pollJobState(
requestClient: RequestClient,
@@ -246,5 +246,3 @@ const doPoll = async (
return { state, pollCount }
}
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))