Skip to content

Commit

Permalink
feat: add auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Lokrip committed Feb 3, 2025
1 parent 8eb382b commit ecce524
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
13 changes: 13 additions & 0 deletions server/models/shop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from django.db import models

class Product(models.Model):



class Meta:
verbose_name = _("Product")
verbose_name_plural = _("Products")

def __str__(self):
return self.name

17 changes: 13 additions & 4 deletions src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,25 @@ const authConfig = {

if (user && user.password == credentials.password) {
return {
id: String(1),
email: 'admin@gmail.com',
id: String(1),
email: 'admin@gmail.com',
password: 'lol1234lol1234'
} as User;
}

return null;
},
})
]
],
session: {
strategy: "jwt",
},
pages: {
signIn: "/account/login"
},
callbacks: {

}
}

export default authConfig;
export default authConfig;

0 comments on commit ecce524

Please sign in to comment.