mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
553f8e58d4
* fix: oauth2 redirect url not consistent * only use one redirect uri * feat: allow to disable password authentication * generate translation template * update error * redirect * query
24 lines
436 B
Go
24 lines
436 B
Go
package model
|
|
|
|
type Oauth2Bind struct {
|
|
Common
|
|
|
|
UserID uint64 `gorm:"uniqueIndex:u_p_o" json:"user_id,omitempty"`
|
|
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
|
|
}
|