mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
auth/utils.ts: Fix type of done callback 🐛
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
5d3c636c14
commit
cc5db72369
1 changed files with 5 additions and 5 deletions
|
@ -2,10 +2,10 @@ import { User } from '../../models'
|
||||||
import { logger } from '../../logger'
|
import { logger } from '../../logger'
|
||||||
|
|
||||||
export function passportGeneralCallback (
|
export function passportGeneralCallback (
|
||||||
accessToken,
|
accessToken: string,
|
||||||
refreshToken,
|
refreshToken: string,
|
||||||
profile,
|
profile: any,
|
||||||
done: (err: any, user: User | null) => void
|
done: (err?: Error | null, user?: User) => void
|
||||||
): void {
|
): void {
|
||||||
const stringifiedProfile = JSON.stringify(profile)
|
const stringifiedProfile = JSON.stringify(profile)
|
||||||
User.findOrCreate({
|
User.findOrCreate({
|
||||||
|
@ -44,6 +44,6 @@ export function passportGeneralCallback (
|
||||||
}
|
}
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
logger.error('auth callback failed: ' + err)
|
logger.error('auth callback failed: ' + err)
|
||||||
return done(err, null)
|
return done(err, undefined)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue