Skip to content

Commit

Permalink
chore: Update customer auth links (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith authored Dec 11, 2024
1 parent 711ea9f commit 57a2cd3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion control-plane/src/modules/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ export const extractCustomAuthState = async (
if (!cluster.enable_custom_auth) {
throw new AuthenticationError(
"Custom auth is not enabled for this cluster",
"https://docs.inferable.ai/pages/auth#customer-provided-secrets"
"https://docs.inferable.ai/pages/custom-auth"
);
}

Expand Down
10 changes: 5 additions & 5 deletions control-plane/src/modules/auth/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const verify = async ({
if (typeof cached === "object" && 'error' in cached && typeof cached.error === "string") {
throw new AuthenticationError(
cached.error,
"https://docs.inferable.ai/pages/auth#handlecustomerauth"
"https://docs.inferable.ai/pages/custom-auth"
);
}
return cached;
Expand All @@ -56,7 +56,7 @@ export const verify = async ({
if (!functionDefinition) {
throw new AuthenticationError(
`${VERIFY_FUNCTION_ID} is not registered`,
"https://docs.inferable.ai/pages/auth#handlecustomerauth"
"https://docs.inferable.ai/pages/custom-auth"
);
}

Expand All @@ -80,7 +80,7 @@ export const verify = async ({
if (result.status == "success" && result.resultType !== "resolution") {
throw new AuthenticationError(
"Custom auth token is not valid",
"https://docs.inferable.ai/pages/auth#handlecustomerauth"
"https://docs.inferable.ai/pages/custom-auth"
);
}

Expand All @@ -94,7 +94,7 @@ export const verify = async ({
if (!result.result) {
throw new AuthenticationError(
`${VERIFY_FUNCTION_ID} did not return a result`,
"https://docs.inferable.ai/pages/auth#handlecustomerauth"
"https://docs.inferable.ai/pages/custom-auth"
);
}

Expand All @@ -105,7 +105,7 @@ export const verify = async ({
if (e instanceof JobPollTimeoutError) {
throw new AuthenticationError(
`Call to ${VERIFY_FUNCTION_ID} did not complete in time`,
"https://docs.inferable.ai/pages/auth#handlecustomerauth"
"https://docs.inferable.ai/pages/custom-auth"
);
}

Expand Down
1 change: 1 addition & 0 deletions sdk-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The `useRun` hook returns an object with the following properties:


#### Existing Runs

It can be used to interact with an existing run by specifying the `runId`:
```typescript
const { messages, run, createMessage, start } = useRun({
Expand Down

0 comments on commit 57a2cd3

Please sign in to comment.