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

Function SaveToken

pkg/auth/token_store.go:38–40  ·  view source on GitHub ↗

SaveToken persists tokens (and the user identity, when present) from an OAuthTokenResponse to the OS keychain.

(resp *dashboard.OAuthTokenResponse)

Source from the content-addressed store, hash-verified

36// SaveToken persists tokens (and the user identity, when present) from an
37// OAuthTokenResponse to the OS keychain.
38func SaveToken(resp *dashboard.OAuthTokenResponse) error {
39 return persistToken(storedTokenFromResponse(resp))
40}
41
42// storedTokenFromResponse builds a StoredToken from an OAuth token response,
43// including the user identity when the response carries a user object.

Calls 2

persistTokenFunction · 0.85
storedTokenFromResponseFunction · 0.85