Skip to content

Commit fcbe55a

Browse files
authored
Fix links on auth page to sdk/api ref (#1572)
Fixes DOC-391
1 parent 3de93c9 commit fcbe55a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/langsmith/set-up-custom-auth.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Now that you have a base LangGraph app, add authentication to it.
7878
In this tutorial, you will start with a hard-coded token for example purposes. You will get to a "production-ready" authentication scheme in the third tutorial.
7979
</Note>
8080

81-
The [`Auth`](https://langchain-ai.github.io/langgraph/cloud/reference/sdk/python-sdk_ref#langgraph_sdk.auth.Auth) object lets you register an authentication function that the LangSmith deployment will run on every request. This function receives each request and decides whether to accept or reject.
81+
The @[Auth] object lets you register an authentication function that the LangSmith deployment will run on every request. This function receives each request and decides whether to accept or reject.
8282

8383
Create a new file `src/security/auth.py`. This is where your code will live to check if users are allowed to access your bot:
8484

@@ -114,12 +114,12 @@ async def get_current_user(authorization: str | None) -> Auth.types.MinimalUserD
114114
}
115115
```
116116

117-
Notice that your [authentication](https://langchain-ai.github.io/langgraph/cloud/reference/sdk/python-sdk_ref#langgraph_sdk.auth.Auth.authenticate) handler does two important things:
117+
Notice that your @[Auth.authenticate] handler does two important things:
118118

119119
1. Checks if a valid token is provided in the request's [Authorization header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization)
120-
2. Returns the user's [identity](https://langchain-ai.github.io/langgraph/cloud/reference/sdk/python-sdk_ref#langgraph_sdk.auth.types.MinimalUserDict)
120+
2. Returns the user's @[MinimalUserDict]
121121

122-
Now tell LangGraph to use authentication by adding the following to the [`langgraph.json`](/langsmith/cli#configuration-file) configuration:
122+
Now tell LangGraph to use authentication by adding the following to the @[langgraph.json] configuration:
123123

124124
```json {highlight={7-9}} title="langgraph.json"
125125
{
@@ -203,4 +203,4 @@ Now that you can control who accesses your bot, you might want to:
203203

204204
1. Continue the tutorial by going to [Make conversations private](/langsmith/resource-auth) to learn about resource authorization.
205205
2. Read more about [authentication concepts](/langsmith/auth).
206-
3. Check out the [API reference](https://langchain-ai.github.io/langgraph/cloud/reference/sdk/python-sdk_ref) for more authentication details.
206+
3. Check out the API reference for @[Auth], @[Auth.authenticate], and @[MinimalUserDict] for more authentication details.

0 commit comments

Comments
 (0)