feat:allow signup without verification (#39)

* fix: add disable basic auth check in resolvers

* feat: allow signup without email verification

Resolves #32
This commit is contained in:
Lakhan Samani
2021-07-28 15:43:08 +05:30
committed by GitHub
parent 0a2efe048b
commit a0171ad500
10 changed files with 344 additions and 281 deletions

View File

@@ -13,10 +13,10 @@ import (
"github.com/authorizerdev/authorizer/server/utils"
)
func Token(ctx context.Context) (*model.LoginResponse, error) {
func Token(ctx context.Context) (*model.AuthResponse, error) {
metaInfo := utils.GetMetaInfo()
log.Println("=> meta", metaInfo)
var res *model.LoginResponse
var res *model.AuthResponse
gc, err := utils.GinContextFromContext(ctx)
if err != nil {
@@ -55,7 +55,7 @@ func Token(ctx context.Context) (*model.LoginResponse, error) {
}, enum.AccessToken)
}
utils.SetCookie(gc, token)
res = &model.LoginResponse{
res = &model.AuthResponse{
Message: `Token verified`,
AccessToken: &token,
AccessTokenExpiresAt: &expiresAt,