Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update customer auth links #282

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading