@@ -169,11 +169,7 @@ export const SingleSignInPage = ({
|
||||
profile,
|
||||
}),
|
||||
);
|
||||
analytics.captureEvent('signIn', 'success', {
|
||||
attributes: {
|
||||
userEntityRef: identityResponse.identity.userEntityRef,
|
||||
},
|
||||
});
|
||||
analytics.captureEvent('signIn', 'success');
|
||||
} catch (err: any) {
|
||||
// User closed the sign-in modal
|
||||
setError(err);
|
||||
|
||||
@@ -117,15 +117,11 @@ export const useSignInProviders = (
|
||||
signOut: async () => {
|
||||
localStorage.removeItem(PROVIDER_STORAGE_KEY);
|
||||
await identityApi.signOut?.();
|
||||
analytics.captureEvent('signOut', 'success');
|
||||
},
|
||||
}),
|
||||
);
|
||||
const identityResponse = await identityApi.getBackstageIdentity();
|
||||
analytics.captureEvent('signIn', 'success', {
|
||||
attributes: {
|
||||
userEntityRef: identityResponse.userEntityRef,
|
||||
},
|
||||
});
|
||||
analytics.captureEvent('signIn', 'success');
|
||||
},
|
||||
[onSignInSuccess, analytics],
|
||||
);
|
||||
|
||||
@@ -63,13 +63,7 @@ export const UserSettingsMenu = () => {
|
||||
data-testid="sign-out"
|
||||
onClick={() => {
|
||||
identityApi.signOut().catch(error => errorApi.post(error));
|
||||
identityApi.getBackstageIdentity().then(identity => {
|
||||
analytics.captureEvent('signOut', 'success', {
|
||||
attributes: {
|
||||
userEntityRef: identity.userEntityRef,
|
||||
},
|
||||
});
|
||||
});
|
||||
analytics.captureEvent('signOut', 'success');
|
||||
}}
|
||||
>
|
||||
<ListItemIcon>
|
||||
|
||||
Reference in New Issue
Block a user