MCPcopy Create free account
hub / github.com/freecodexyz/free-code / isGcpAuthRefreshFromProjectSettings

Function isGcpAuthRefreshFromProjectSettings

src/utils/auth.ts:825–837  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

823 * Check if the configured gcpAuthRefresh comes from project settings
824 */
825export function isGcpAuthRefreshFromProjectSettings(): boolean {
826 const gcpAuthRefresh = getConfiguredGcpAuthRefresh()
827 if (!gcpAuthRefresh) {
828 return false
829 }
830
831 const projectSettings = getSettingsForSource('projectSettings')
832 const localSettings = getSettingsForSource('localSettings')
833 return (
834 projectSettings?.gcpAuthRefresh === gcpAuthRefresh ||
835 localSettings?.gcpAuthRefresh === gcpAuthRefresh
836 )
837}
838
839/** Short timeout for the GCP credentials probe. Without this, when no local
840 * credential source exists (no ADC file, no env var), google-auth-library falls

Callers 2

runGcpAuthRefreshFunction · 0.85

Calls 2

getSettingsForSourceFunction · 0.85

Tested by

no test coverage detected