Skip to content

Commit 2b4556d

Browse files
committed
🤖 GITHUB ACTIONS format_prettier
1 parent 8e70a5b commit 2b4556d

1 file changed

Lines changed: 34 additions & 32 deletions

File tree

‎src/app/authorize/components/form-authorize/form-authorize.component.ts‎

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ export class FormAuthorizeComponent implements OnInit, OnDestroy {
190190
const signinUrl = queryParams ? `/signin?${queryParams}` : '/signin'
191191
;(this.window as any).outOfRouterNavigation(signinUrl)
192192
}
193-
193+
194194
authorize(value = true) {
195-
this.loadingAuthorizeEndpoint = true;
195+
this.loadingAuthorizeEndpoint = true
196196

197197
this._togglz
198198
.getStateOf(TogglzFlag.OAUTH_AUTHORIZATION)
@@ -202,36 +202,38 @@ export class FormAuthorizeComponent implements OnInit, OnDestroy {
202202
// 1. New logic: Update journey context right away
203203
this._observability.updateJourneyContext('oauth_authorization', {
204204
OAUTH_AUTHORIZATION: useAuthServerFlag,
205-
});
205+
})
206206
}),
207207
switchMap((useAuthServerFlag) => {
208208
if (useAuthServerFlag === true) {
209-
return this._oauth.authorizeOnAuthServer(this.oauthRequest, value).pipe(
210-
// 2. Auth Server Telemetry
211-
tap(() => {
212-
this._observability.recordEvent(
213-
'oauth_authorization',
214-
value
215-
? AppEventName.OauthAuthorizationSuccess
216-
: AppEventName.OauthAuthorizationDenied,
217-
{ OAUTH_AUTHORIZATION: true }
218-
);
219-
}),
220-
catchError((error) => {
221-
this._observability.recordEvent(
222-
'oauth_authorization',
223-
AppEventName.OauthAuthorizationError,
224-
oauthAuthorizeHttpFailureEventAttrs(
225-
error,
226-
'auth_server',
227-
value,
228-
true
209+
return this._oauth
210+
.authorizeOnAuthServer(this.oauthRequest, value)
211+
.pipe(
212+
// 2. Auth Server Telemetry
213+
tap(() => {
214+
this._observability.recordEvent(
215+
'oauth_authorization',
216+
value
217+
? AppEventName.OauthAuthorizationSuccess
218+
: AppEventName.OauthAuthorizationDenied,
219+
{ OAUTH_AUTHORIZATION: true }
229220
)
230-
);
231-
// Throw the error down to the final subscribe block
232-
return throwError(() => error);
233-
})
234-
);
221+
}),
222+
catchError((error) => {
223+
this._observability.recordEvent(
224+
'oauth_authorization',
225+
AppEventName.OauthAuthorizationError,
226+
oauthAuthorizeHttpFailureEventAttrs(
227+
error,
228+
'auth_server',
229+
value,
230+
true
231+
)
232+
)
233+
// Throw the error down to the final subscribe block
234+
return throwError(() => error)
235+
})
236+
)
235237
} else {
236238
return this._oauth.authorize(value).pipe(
237239
// 3. Legacy Telemetry
@@ -242,7 +244,7 @@ export class FormAuthorizeComponent implements OnInit, OnDestroy {
242244
? AppEventName.OauthAuthorizationSuccess
243245
: AppEventName.OauthAuthorizationDenied,
244246
{ OAUTH_AUTHORIZATION: false }
245-
);
247+
)
246248
}),
247249
catchError((error) => {
248250
this._observability.recordEvent(
@@ -254,11 +256,11 @@ export class FormAuthorizeComponent implements OnInit, OnDestroy {
254256
value,
255257
false
256258
)
257-
);
259+
)
258260
// Throw the error down to the final subscribe block
259-
return throwError(() => error);
261+
return throwError(() => error)
260262
})
261-
);
263+
)
262264
}
263265
})
264266
)

0 commit comments

Comments
 (0)