]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/auth/oauth.ts
Translated using Weblate (Galician)
[github/Chocobozzz/PeerTube.git] / server / lib / auth / oauth.ts
index 5b6130d567301d802ea49292b508911e38ad4395..2bf7a63617e935b105d6b0039486c396084a884e 100644 (file)
@@ -1,4 +1,4 @@
-import * as express from 'express'
+import express from 'express'
 import {
   InvalidClientError,
   InvalidGrantError,
@@ -8,8 +8,9 @@ import {
   UnauthorizedClientError,
   UnsupportedGrantTypeError
 } from 'oauth2-server'
-import { randomBytesPromise, sha1 } from '@server/helpers/core-utils'
+import { randomBytesPromise } from '@server/helpers/core-utils'
 import { MOAuthClient } from '@server/types/models'
+import { sha1 } from '@shared/extra-utils'
 import { OAUTH_LIFETIME } from '../../initializers/constants'
 import { BypassLogin, getClient, getRefreshToken, getUser, revokeToken, saveToken } from './oauth-model'
 
@@ -81,7 +82,7 @@ async function handleOAuthToken (req: express.Request, options: { refreshTokenAu
   })
 }
 
-async function handleOAuthAuthenticate (
+function handleOAuthAuthenticate (
   req: express.Request,
   res: express.Response,
   authenticateInQuery = false