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

Function OAuthClientID

pkg/auth/oauth_flow.go:19–28  ·  view source on GitHub ↗

OAuthClientID returns the OAuth client ID, preferring the ALGOLIA_OAUTH_CLIENT_ID environment variable over the compiled-in default (set via ldflags).

()

Source from the content-addressed store, hash-verified

17// OAuthClientID returns the OAuth client ID, preferring the ALGOLIA_OAUTH_CLIENT_ID
18// environment variable over the compiled-in default (set via ldflags).
19func OAuthClientID() string {
20 if v := os.Getenv("ALGOLIA_OAUTH_CLIENT_ID"); v != "" {
21 return v
22 }
23 if DefaultOAuthClientID == "" {
24 fmt.Fprintln(os.Stderr, "fatal: ALGOLIA_OAUTH_CLIENT_ID is not set and no default was compiled in")
25 os.Exit(1)
26 }
27 return DefaultOAuthClientID
28}
29
30// RunOAuth runs the OAuth PKCE flow with a local callback server and returns
31// a valid access token. A local HTTP server is started on a random port to

Callers 12

runOpenCmdFunction · 0.92
resolveScopeMethod · 0.92
openDashboardTargetFunction · 0.92
runGetCmdFunction · 0.92
runOAuthFlowStepsFunction · 0.92
runLogoutCmdFunction · 0.92
changePlanFunction · 0.92
runUpdateCmdFunction · 0.92
runListCmdFunction · 0.92
runSelectCmdFunction · 0.92
createApplicationFunction · 0.92
runPlansCmdFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected