aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/standalone/videos')
-rw-r--r--client/src/standalone/videos/embed.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index fc61d3730..4ce5c78e8 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -5,6 +5,7 @@ import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-c
5import { 5import {
6 ClientHookName, 6 ClientHookName,
7 HTMLServerConfig, 7 HTMLServerConfig,
8 OAuth2ErrorCode,
8 PluginType, 9 PluginType,
9 ResultList, 10 ResultList,
10 UserRefreshToken, 11 UserRefreshToken,
@@ -118,8 +119,8 @@ export class PeerTubeEmbed {
118 if (res.status === HttpStatusCode.UNAUTHORIZED_401) return undefined 119 if (res.status === HttpStatusCode.UNAUTHORIZED_401) return undefined
119 120
120 return res.json() 121 return res.json()
121 }).then((obj: UserRefreshToken & { code: 'invalid_grant'}) => { 122 }).then((obj: UserRefreshToken & { code?: OAuth2ErrorCode }) => {
122 if (!obj || obj.code === 'invalid_grant') { 123 if (!obj || obj.code === OAuth2ErrorCode.INVALID_GRANT) {
123 Tokens.flush() 124 Tokens.flush()
124 this.removeTokensFromHeaders() 125 this.removeTokensFromHeaders()
125 126