aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos/shared/auth-http.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/standalone/videos/shared/auth-http.ts')
-rw-r--r--client/src/standalone/videos/shared/auth-http.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/standalone/videos/shared/auth-http.ts b/client/src/standalone/videos/shared/auth-http.ts
index c1e9f7750..3dfc47b88 100644
--- a/client/src/standalone/videos/shared/auth-http.ts
+++ b/client/src/standalone/videos/shared/auth-http.ts
@@ -1,4 +1,4 @@
1import { HttpStatusCode, OAuth2ErrorCode, UserRefreshToken } from '../../../../../shared/models' 1import { HttpStatusCode, OAuth2ErrorCode, OAuth2ErrorCodeType, UserRefreshToken } from '@peertube/peertube-models'
2import { OAuthUserTokens, objectToUrlEncoded } from '../../../root-helpers' 2import { OAuthUserTokens, objectToUrlEncoded } from '../../../root-helpers'
3import { peertubeLocalStorage } from '../../../root-helpers/peertube-web-storage' 3import { peertubeLocalStorage } from '../../../root-helpers/peertube-web-storage'
4 4
@@ -66,7 +66,7 @@ export class AuthHTTP {
66 if (res.status === HttpStatusCode.UNAUTHORIZED_401) return undefined 66 if (res.status === HttpStatusCode.UNAUTHORIZED_401) return undefined
67 67
68 return res.json() 68 return res.json()
69 }).then((obj: UserRefreshToken & { code?: OAuth2ErrorCode }) => { 69 }).then((obj: UserRefreshToken & { code?: OAuth2ErrorCodeType }) => {
70 if (!obj || obj.code === OAuth2ErrorCode.INVALID_GRANT) { 70 if (!obj || obj.code === OAuth2ErrorCode.INVALID_GRANT) {
71 OAuthUserTokens.flushLocalStorage(peertubeLocalStorage) 71 OAuthUserTokens.flushLocalStorage(peertubeLocalStorage)
72 this.removeTokensFromHeaders() 72 this.removeTokensFromHeaders()