mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 02:11:40 +00:00
feat: implement passkey registration flow
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package session
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -34,13 +33,6 @@ func (s *HTTPContext) InitSession() error {
|
||||
return err
|
||||
}
|
||||
}
|
||||
fmt.Println(sess.BrowserName)
|
||||
fmt.Println(sess.BrowserVersion)
|
||||
fmt.Println(sess.UserArchitecture)
|
||||
fmt.Println(sess.Platform)
|
||||
fmt.Println(sess.PlatformVersion)
|
||||
fmt.Println(sess.DeviceModel)
|
||||
|
||||
s.sess = &sess
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -4,12 +4,13 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/pkg/gateway/config"
|
||||
"github.com/onsonr/sonr/pkg/gateway/internal/database"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// Middleware creates a new session middleware
|
||||
func Middleware(db *gorm.DB) echo.MiddlewareFunc {
|
||||
func Middleware(db *gorm.DB, env config.Env) echo.MiddlewareFunc {
|
||||
return func(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
cc := NewHTTPContext(c, db)
|
||||
@@ -26,6 +27,7 @@ type HTTPContext struct {
|
||||
echo.Context
|
||||
db *gorm.DB
|
||||
sess *database.Session
|
||||
env config.Env
|
||||
}
|
||||
|
||||
// Get returns the HTTPContext from the echo context
|
||||
|
||||
Reference in New Issue
Block a user