diff --git a/docs/tutorials/backend-to-backend-auth.md b/docs/tutorials/backend-to-backend-auth.md index b49a9fe3b5..3cb72a4827 100644 --- a/docs/tutorials/backend-to-backend-auth.md +++ b/docs/tutorials/backend-to-backend-auth.md @@ -60,12 +60,9 @@ const response = await fetch(pluginBackendApiUrl, { }); ``` -You can use the same `tokenManager` to validate tokens supplied on incoming +You can use the same `tokenManager` to authenticate tokens supplied on incoming requests: ```typescript -const isValidServerToken = await tokenManager.validateToken(token); -if (!isValidServerToken) { - throw new UnauthorizedError(); -} +await tokenManager.authenticate(token); // throws if token is invalid ```