Skip to content

Commit

Permalink
Removing paseto from google authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
p-shubh committed Jun 14, 2024
1 parent 1c945d8 commit f05ec7a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/v1/account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ func ApplyRoutes(r *gin.RouterGroup) {
g := r.Group("/account")
{
g.POST("generate-auth-id", GenerateAuthId)
g.POST("auth-google", authGoogle)
g.Use(paseto.PASETO(true))
g.POST("paseto-from-magic-link", PasetoFromMagicLink)
g.POST("auth-google", authGoogle)
g.Use(paseto.PASETO(false))
g.DELETE("remove-mail", removeMail)
}
Expand Down
2 changes: 1 addition & 1 deletion api/v1/authenticate/authenticate.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func ApplyRoutes(r *gin.RouterGroup) {

func authenticate(c *gin.Context) {
db := dbconfig.GetDb()
chain_symbol := c.Query("chain")
chain_symbol := c.Query("chain") //google
//TODO remove flow id if 200"
var req AuthenticateRequest

Expand Down
2 changes: 2 additions & 0 deletions api/v1/authenticate/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ type AuthenticateRequest struct {
PubKey string `json:"pubKey" binding:"omitempty"`
SignatureSui string `json:"signatureSui" binding:"omitempty"`
Message string `json:"message" binding:"omitempty"`
AccessToken string `json:"accessToken" binding:"omitempty"`
IdToken string `json:"idToken" binding:"omitempty"` // to be pass in bearer token [ AUTHORIZATION KEY ]
}
type AuthenticateRequestNoSign struct {
FlowId string `json:"flowId" binding:"required"`
Expand Down
1 change: 1 addition & 0 deletions models/Migrate/migrate_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type User struct {
UserId string `gorm:"primary_key;type:uuid"`
Name string
WalletAddress string
DeviceType string // web3.0,web2.0,mobile
Discord string
Twitter string
FlowIds []FlowId
Expand Down

0 comments on commit f05ec7a

Please sign in to comment.