fix: oauth2 redirect url not consistent (#930)

* fix: oauth2 redirect url not consistent

* only use one redirect uri

* feat: allow to disable password authentication

* generate translation template

* update error

* redirect

* query
This commit is contained in:
UUBulb
2024-12-31 22:29:29 +08:00
committed by GitHub
parent 953fa153cc
commit 553f8e58d4
10 changed files with 272 additions and 212 deletions

View File

@@ -7,3 +7,17 @@ type Oauth2Bind struct {
Provider string `gorm:"uniqueIndex:u_p_o" json:"provider,omitempty"`
OpenID string `gorm:"uniqueIndex:u_p_o" json:"open_id,omitempty"`
}
type Oauth2LoginType uint8
const (
_ Oauth2LoginType = iota
RTypeLogin
RTypeBind
)
type Oauth2State struct {
Action Oauth2LoginType
Provider string
State string
}