fix qr auth
This commit is contained in:
@@ -201,6 +201,8 @@ export class AdvancedAuthService {
|
||||
}
|
||||
|
||||
private buildQrSessionResponse(sessionId: string, data: StoredQrSession, qrPayload?: string) {
|
||||
const auth = data.auth
|
||||
|
||||
return {
|
||||
sessionId,
|
||||
status: data.status,
|
||||
@@ -208,16 +210,20 @@ export class AdvancedAuthService {
|
||||
qrPayload,
|
||||
claimed: Boolean(data.claimed && data.fingerprint),
|
||||
claimedDeviceName: data.claimed && data.deviceName ? data.deviceName : undefined,
|
||||
auth: data.auth
|
||||
accessToken: auth?.accessToken,
|
||||
refreshToken: auth?.refreshToken,
|
||||
authSessionId: auth?.sessionId,
|
||||
pinVerified: auth?.pinVerified,
|
||||
auth: auth
|
||||
? {
|
||||
accessToken: data.auth.accessToken,
|
||||
refreshToken: data.auth.refreshToken,
|
||||
sessionId: data.auth.sessionId,
|
||||
pinVerified: data.auth.pinVerified,
|
||||
expiresAt: data.auth.expiresAt,
|
||||
requiresTotp: data.auth.requiresTotp,
|
||||
totpChallengeToken: data.auth.totpChallengeToken,
|
||||
user: data.auth.user
|
||||
accessToken: auth.accessToken,
|
||||
refreshToken: auth.refreshToken,
|
||||
sessionId: auth.sessionId,
|
||||
pinVerified: auth.pinVerified,
|
||||
expiresAt: auth.expiresAt,
|
||||
requiresTotp: auth.requiresTotp,
|
||||
totpChallengeToken: auth.totpChallengeToken,
|
||||
user: auth.user
|
||||
}
|
||||
: undefined
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user