fix: add events for signup

This commit is contained in:
Lakhan Samani
2023-08-02 10:02:41 +05:30
parent b028be3cbc
commit a8503666e3
6 changed files with 13 additions and 0 deletions

View File

@@ -301,6 +301,8 @@ func SignupResolver(ctx context.Context, params model.SignUpInput) (*model.AuthR
go func() {
utils.RegisterEvent(ctx, constants.UserSignUpWebhookEvent, constants.AuthRecipeMethodBasicAuth, user)
// User is also logged in with signup
utils.RegisterEvent(ctx, constants.UserLoginWebhookEvent, constants.AuthRecipeMethodBasicAuth, user)
db.Provider.AddSession(ctx, &models.Session{
UserID: user.ID,
UserAgent: utils.GetUserAgent(gc.Request),