diff --git a/src/lib/web/auth/dropbox/index.ts b/src/lib/web/auth/dropbox/index.ts index bf8db04a6..a6f4d750e 100644 --- a/src/lib/web/auth/dropbox/index.ts +++ b/src/lib/web/auth/dropbox/index.ts @@ -18,7 +18,7 @@ export const DropboxMiddleware: AuthMiddleware = { }, ( accessToken: string, refreshToken: string, - profile: any, + profile, done: (err?: Error | null, user?: User) => void ): void => { // the Dropbox plugin wraps the email addresses in an object diff --git a/src/lib/web/auth/google/index.ts b/src/lib/web/auth/google/index.ts index 54c2753ed..165d1f7e5 100644 --- a/src/lib/web/auth/google/index.ts +++ b/src/lib/web/auth/google/index.ts @@ -17,7 +17,7 @@ export const GoogleMiddleware: AuthMiddleware = { }, ( accessToken: string, refreshToken: string, - profile: any, + profile, done) => { /* This ugly hack is neccessary, because the Google Strategy wants a done-callback with an err as Error | null | undefined diff --git a/src/lib/web/auth/oauth2/oauth2-custom-strategy.ts b/src/lib/web/auth/oauth2/oauth2-custom-strategy.ts index 4fec1cbc8..a6b80fcc3 100644 --- a/src/lib/web/auth/oauth2/oauth2-custom-strategy.ts +++ b/src/lib/web/auth/oauth2/oauth2-custom-strategy.ts @@ -2,7 +2,7 @@ import { InternalOAuthError, Strategy as OAuth2Strategy } from 'passport-oauth2' import { config } from '../../../config' import { Profile, ProviderEnum } from '../../../models/user' -function extractProfileAttribute (data, path: string): any { +function extractProfileAttribute (data, path: string): string { // can handle stuff like `attrs[0].name` const pathArray = path.split('.') for (const segment of pathArray) { diff --git a/src/lib/web/auth/utils.ts b/src/lib/web/auth/utils.ts index bf0de1fc6..025b21478 100644 --- a/src/lib/web/auth/utils.ts +++ b/src/lib/web/auth/utils.ts @@ -1,10 +1,11 @@ +import { Profile } from 'passport' import { User } from '../../models' import { logger } from '../../logger' export function passportGeneralCallback ( accessToken: string, refreshToken: string, - profile: any, + profile: Profile, done: (err?: Error | null, user?: User) => void ): void { const stringifiedProfile = JSON.stringify(profile)