More build fixes

This commit is contained in:
Darren Clarke 2023-05-26 08:27:16 +00:00
parent 8fabcbaba2
commit 67b9b3e20a
11 changed files with 34 additions and 53 deletions

View file

@ -58,16 +58,16 @@ const validateAuth = (sharedSecret) => (request, username, password) => {
return { isValid, credentials };
};
const register = async <TUser, TProfile, TSession>(
const register = async (
server: Hapi.Server,
pluginOpts?: NextAuthPluginOptions<TUser, TProfile, TSession>
pluginOpts?: any
): Promise<void> => {
const options: NextAuthPluginOptions<TUser, TProfile, TSession> =
const options: any =
Hoek.applyToDefaults(
// a little type gymnastics here to workaround poor typing
defaultOptions as unknown,
defaultOptions as any,
pluginOpts
) as NextAuthPluginOptions<TUser, TProfile, TSession>;
) as any;
if (!options.nextAuthAdapterFactory) {
throw new Error(