web: added the base for the web project

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-10-26 20:53:11 +02:00
parent 15e29edaa7
commit 8a87fff689
107 changed files with 3607 additions and 512 deletions

View File

@@ -8,7 +8,7 @@ import {
import { db } from "@/server/db";
import Credentials from "next-auth/providers/credentials";
import { createError } from "./exceptions";
import { verifyPassword } from "@/services/hash.service";
import { verifyPassword } from "@/server/services/hash.service";
/**
* Module augmentation for `next-auth` types. Allows us to add custom properties to the `session`
@@ -46,7 +46,9 @@ export const authOptions: NextAuthOptions = {
},
}),
},
// adapter: PrismaAdapter(db),
session: {
strategy: "jwt",
},
providers: [
Credentials({
name: "Credentials",
@@ -60,7 +62,10 @@ export const authOptions: NextAuthOptions = {
});
if (user) {
return user;
return {
...user,
image: 'https://avatars.githubusercontent.com/u/18133?v=4'
};
} else {
return null;
}