MCPcopy
hub / github.com/triggerdotdev/trigger.dev / verifyApiKey

Function verifyApiKey

packages/react/src/TriggerProvider.tsx:56–68  ·  view source on GitHub ↗
(apiKey: string)

Source from the content-addressed store, hash-verified

54}
55
56function verifyApiKey(apiKey: string) {
57 if (apiKey.startsWith(privateApiKeyStartsWith)) {
58 throw new Error(
59 `You are using a private API key, you should not do this because the value is visible to the client.`
60 );
61 }
62
63 if (!apiKey.startsWith(publicApiKeyStartsWith)) {
64 console.error(
65 `TriggerProvider publicApiKey wasn't in the correct format. Should be ${publicApiKeyStartsWith}...`
66 );
67 }
68}

Callers 1

TriggerProviderFunction · 0.85

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…