Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export type SessionInfo = {

export type OrchestrationToken = string

export type AuthenticationToken = { tkn: string, mfaRequired?: boolean }
export type AuthenticationToken = { tkn?: string, mfaRequired?: boolean }

export type PasswordlessResponse = MFA.ChallengeId

Expand Down
5 changes: 4 additions & 1 deletion src/main/oAuthClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,10 @@ export default class OAuthClient {
}
})
.then(tkn => this.storeCredentialsInBrowser(loginParams).then(() => tkn))
.then(tkn => this.loginCallback(tkn, auth))
.then(tkn => {
if(tkn.tkn == undefined) return Promise.resolve({})
else return this.loginCallback(tkn, auth)
})

return resultPromise.catch(err => {
if (err.error) {
Expand Down
5 changes: 4 additions & 1 deletion src/main/webAuthnClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,10 @@ export default class WebAuthnClient {
webauthnId: registrationOptions.options.publicKey.user.id
}
})
.then((tkn) => this.oAuthClient.loginCallback(tkn, auth))
.then((tkn) => {
if(tkn.tkn == undefined) return Promise.resolve({})
else return this.oAuthClient.loginCallback(tkn, auth)
})
})
.catch((err) => {
if (err.error) this.eventManager.fireEvent('login_failed', err)
Expand Down