aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users/token.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users/token.ts')
-rw-r--r--server/controllers/api/users/token.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/users/token.ts b/server/controllers/api/users/token.ts
index e636f44f6..b405ddbf4 100644
--- a/server/controllers/api/users/token.ts
+++ b/server/controllers/api/users/token.ts
@@ -1,7 +1,7 @@
1import * as express from 'express' 1import * as express from 'express'
2import * as RateLimit from 'express-rate-limit' 2import * as RateLimit from 'express-rate-limit'
3import { v4 as uuidv4 } from 'uuid'
4import { logger } from '@server/helpers/logger' 3import { logger } from '@server/helpers/logger'
4import { buildUUID } from '@server/helpers/uuid'
5import { CONFIG } from '@server/initializers/config' 5import { CONFIG } from '@server/initializers/config'
6import { getAuthNameFromRefreshGrant, getBypassFromExternalAuth, getBypassFromPasswordGrant } from '@server/lib/auth/external-auth' 6import { getAuthNameFromRefreshGrant, getBypassFromExternalAuth, getBypassFromPasswordGrant } from '@server/lib/auth/external-auth'
7import { handleOAuthToken } from '@server/lib/auth/oauth' 7import { handleOAuthToken } from '@server/lib/auth/oauth'
@@ -107,7 +107,7 @@ function getScopedTokens (req: express.Request, res: express.Response) {
107async function renewScopedTokens (req: express.Request, res: express.Response) { 107async function renewScopedTokens (req: express.Request, res: express.Response) {
108 const user = res.locals.oauth.token.user 108 const user = res.locals.oauth.token.user
109 109
110 user.feedToken = uuidv4() 110 user.feedToken = buildUUID()
111 await user.save() 111 await user.save()
112 112
113 return res.json({ 113 return res.json({