hapi-nextauth: update packages, fix linter and typescript

This commit is contained in:
Abel Luck 2023-03-13 09:34:36 +00:00
parent 7aa1ec74eb
commit fbe33c5c7b
6 changed files with 595 additions and 3870 deletions

View file

@ -62,15 +62,12 @@ const register = async <TUser, TProfile, TSession>(
server: Hapi.Server,
pluginOpts?: NextAuthPluginOptions<TUser, TProfile, TSession>
): Promise<void> => {
const options: NextAuthPluginOptions<
TUser,
TProfile,
TSession
> = Hoek.applyToDefaults(
// a little type gymnastics here to workaround poor typing
defaultOptions as unknown,
pluginOpts
) as NextAuthPluginOptions<TUser, TProfile, TSession>;
const options: NextAuthPluginOptions<TUser, TProfile, TSession> =
Hoek.applyToDefaults(
// a little type gymnastics here to workaround poor typing
defaultOptions as unknown,
pluginOpts
) as NextAuthPluginOptions<TUser, TProfile, TSession>;
if (!options.nextAuthAdapterFactory) {
throw new Error(