Merge pull request #391 from team-scaletech/fix/webhook_bug_389
Fix/webhook bug 389
This commit is contained in:
commit
c8ccb89a67
|
@ -33,13 +33,13 @@ func LoginResolver(ctx context.Context, params model.LoginInput) (*model.AuthRes
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
|
|
||||||
isBasiAuthDisabled, err := memorystore.Provider.GetBoolStoreEnvVariable(constants.EnvKeyDisableBasicAuthentication)
|
isBasicAuthDisabled, err := memorystore.Provider.GetBoolStoreEnvVariable(constants.EnvKeyDisableBasicAuthentication)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Debug("Error getting basic auth disabled: ", err)
|
log.Debug("Error getting basic auth disabled: ", err)
|
||||||
isBasiAuthDisabled = true
|
isBasicAuthDisabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if isBasiAuthDisabled {
|
if isBasicAuthDisabled {
|
||||||
log.Debug("Basic authentication is disabled.")
|
log.Debug("Basic authentication is disabled.")
|
||||||
return res, fmt.Errorf(`basic authentication is disabled for this instance`)
|
return res, fmt.Errorf(`basic authentication is disabled for this instance`)
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,13 +33,13 @@ func MobileLoginResolver(ctx context.Context, params model.MobileLoginInput) (*m
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
|
|
||||||
isBasiAuthDisabled, err := memorystore.Provider.GetBoolStoreEnvVariable(constants.EnvKeyDisableMobileBasicAuthentication)
|
isBasicAuthDisabled, err := memorystore.Provider.GetBoolStoreEnvVariable(constants.EnvKeyDisableMobileBasicAuthentication)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Debug("Error getting mobile basic auth disabled: ", err)
|
log.Debug("Error getting mobile basic auth disabled: ", err)
|
||||||
isBasiAuthDisabled = true
|
isBasicAuthDisabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if isBasiAuthDisabled {
|
if isBasicAuthDisabled {
|
||||||
log.Debug("Basic authentication is disabled.")
|
log.Debug("Basic authentication is disabled.")
|
||||||
return res, fmt.Errorf(`phone number based basic authentication is disabled for this instance`)
|
return res, fmt.Errorf(`phone number based basic authentication is disabled for this instance`)
|
||||||
}
|
}
|
||||||
|
|
|
@ -313,6 +313,7 @@ func SignupResolver(ctx context.Context, params model.SignUpInput) (*model.AuthR
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
utils.RegisterEvent(ctx, constants.UserCreatedWebhookEvent, constants.AuthRecipeMethodBasicAuth, user)
|
||||||
utils.RegisterEvent(ctx, constants.UserSignUpWebhookEvent, constants.AuthRecipeMethodBasicAuth, user)
|
utils.RegisterEvent(ctx, constants.UserSignUpWebhookEvent, constants.AuthRecipeMethodBasicAuth, user)
|
||||||
// User is also logged in with signup
|
// User is also logged in with signup
|
||||||
utils.RegisterEvent(ctx, constants.UserLoginWebhookEvent, constants.AuthRecipeMethodBasicAuth, user)
|
utils.RegisterEvent(ctx, constants.UserLoginWebhookEvent, constants.AuthRecipeMethodBasicAuth, user)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user