squash all commits and fix service worker (file has to be at this specific path by convention):
Added pwa subscription storage for publishers
This commit is contained in:
@ -86,9 +86,9 @@ export const authOptions: NextAuthOptions = {
|
||||
// // Return null if user data could not be retrieved
|
||||
// return null
|
||||
const users = [
|
||||
{ id: "1", name: "admin", email: "admin@example.com", password: "admin123", role: "ADMIN" },
|
||||
{ id: "2", name: "krasi", email: "krasi@example.com", password: "krasi123", role: "ADMIN" },
|
||||
{ id: "3", name: "popov", email: "popov@example.com", password: "popov123", role: "ADMIN" }
|
||||
{ id: "1", name: "admin", email: "admin@example.com", password: "admin123", role: "ADMIN", static: true },
|
||||
{ id: "2", name: "krasi", email: "krasi@example.com", password: "krasi123", role: "ADMIN", static: true },
|
||||
{ id: "3", name: "popov", email: "popov@example.com", password: "popov123", role: "ADMIN", static: true }
|
||||
];
|
||||
|
||||
const user = users.find(user =>
|
||||
@ -174,6 +174,10 @@ export const authOptions: NextAuthOptions = {
|
||||
callbacks: {
|
||||
// https://codevoweb.com/implement-authentication-with-nextauth-in-nextjs-14/
|
||||
async signIn({ user, account, profile }) {
|
||||
if (account.provider === 'credentials' && user?.static) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var prisma = common.getPrismaClient();
|
||||
|
||||
console.log("[nextauth] signIn:", account.provider, user.email)
|
||||
|
Reference in New Issue
Block a user