fix: social login state
This commit is contained in:
parent
5add964449
commit
28390ebbe4
|
@ -7,7 +7,7 @@ import (
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
|
"github.com/google/uuid"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/authorizerdev/authorizer/server/constants"
|
"github.com/authorizerdev/authorizer/server/constants"
|
||||||
|
@ -40,11 +40,8 @@ func OAuthLoginHandler() gin.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
if state == "" {
|
if state == "" {
|
||||||
log.Debug("state is empty")
|
log.Debug("state is empty. creating a new state")
|
||||||
c.JSON(400, gin.H{
|
state = uuid.New().String()
|
||||||
"error": "invalid state",
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var scope []string
|
var scope []string
|
||||||
|
|
Loading…
Reference in New Issue
Block a user