File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,7 @@ export class RingRestClient {
101
101
private async getAuthToken (
102
102
twoFactorAuthCode ?: string
103
103
) : Promise < AuthTokenResponse > {
104
- const grantData = this . getGrantData ( twoFactorAuthCode ) ,
105
- twoFactorAuthHeaders = twoFactorAuthCode
106
- ? {
107
- '2fa-code' : twoFactorAuthCode ,
108
- '2fa-Support' : 'true'
109
- }
110
- : { }
104
+ const grantData = this . getGrantData ( twoFactorAuthCode )
111
105
112
106
try {
113
107
const response = await requestWithRetry < AuthTokenResponse > ( {
@@ -120,7 +114,8 @@ export class RingRestClient {
120
114
method : 'POST' ,
121
115
headers : {
122
116
'content-type' : 'application/json' ,
123
- ...twoFactorAuthHeaders
117
+ '2fa-support' : 'true' ,
118
+ '2fa-code' : twoFactorAuthCode || ''
124
119
}
125
120
} )
126
121
You can’t perform that action at this time.
0 commit comments