Implement login resolver (#15)
* add sign_up_method to users table * add session store * implement login resolver
This commit is contained in:
@@ -3,7 +3,7 @@ package enum
|
||||
type SignupMethod int
|
||||
|
||||
const (
|
||||
Basic SignupMethod = iota
|
||||
BasicAuth SignupMethod = iota
|
||||
MagicLink
|
||||
Google
|
||||
Github
|
||||
@@ -12,8 +12,8 @@ const (
|
||||
|
||||
func (d SignupMethod) String() string {
|
||||
return [...]string{
|
||||
"basic",
|
||||
"magiclink",
|
||||
"basic_auth",
|
||||
"magic_link",
|
||||
"google",
|
||||
"github",
|
||||
"facebook",
|
||||
|
15
server/enum/tokenType.go
Normal file
15
server/enum/tokenType.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package enum
|
||||
|
||||
type TokenType int
|
||||
|
||||
const (
|
||||
RefreshToken TokenType = iota
|
||||
AccessToken
|
||||
)
|
||||
|
||||
func (d TokenType) String() string {
|
||||
return [...]string{
|
||||
"refresh_token",
|
||||
"access_token",
|
||||
}[d]
|
||||
}
|
Reference in New Issue
Block a user