From e65d8b51745db2361530edfbbc6c2c745a8c7f0a Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Fri, 26 Nov 2021 12:31:10 +0000 Subject: [PATCH] docs: update backend-to-backend auth docs to reflect new TokenManager api Signed-off-by: MT Lewis --- docs/tutorials/backend-to-backend-auth.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 ```