MCPcopy Create free account
hub / github.com/algolia/cli / identifyAuthenticatedUser

Function identifyAuthenticatedUser

pkg/cmd/auth/login/login.go:189–198  ·  view source on GitHub ↗

identifyAuthenticatedUser emits a telemetry Identify for the user that just authenticated. It is a no-op when no identified token is present.

(ctx context.Context)

Source from the content-addressed store, hash-verified

187// identifyAuthenticatedUser emits a telemetry Identify for the user that just
188// authenticated. It is a no-op when no identified token is present.
189func identifyAuthenticatedUser(ctx context.Context) {
190 if !applyStoredIdentity(ctx) {
191 return
192 }
193 client := telemetry.GetTelemetryClient(ctx)
194 if client == nil {
195 return
196 }
197 _ = client.Identify(ctx)
198}
199
200// applyStoredIdentity copies the persisted user identity from the stored token
201// onto the request's telemetry metadata. It reports whether an identity was

Callers 1

runOAuthFlowStepsFunction · 0.85

Calls 3

GetTelemetryClientFunction · 0.92
applyStoredIdentityFunction · 0.85
IdentifyMethod · 0.65

Tested by

no test coverage detected