fix: auth flow fixed, add getOrCreate method for user

This commit is contained in:
2025-09-09 16:57:34 +03:30
parent 406b181576
commit 7d7f54261b
8 changed files with 65 additions and 16 deletions
+7 -1
View File
@@ -73,7 +73,7 @@ func (h *AuthHandler) Authenticate(c *fiber.Ctx) error {
c.Context(),
req.PubKey,
req.Signature,
// add chainID to cfg
//TODO: add chainID to cfg
1,
c.IP(),
c.Get("User-Agent"),
@@ -90,3 +90,9 @@ func (h *AuthHandler) Authenticate(c *fiber.Ctx) error {
ExpiresAt: userToken.ExpiresAt,
})
}
func (h *AuthHandler) HelloWorld(c *fiber.Ctx) error {
return c.Status(fiber.StatusOK).JSON(fiber.Map{
"message": "Hello, World!",
})
}