Allow organization creation on signup

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-02-26 14:48:08 +01:00
parent bdf4273dab
commit def17c6a1a
7 changed files with 214 additions and 64 deletions

View File

@@ -77,13 +77,6 @@ func RegisterHandler(usrmgrSvc *usrmgr.Service, authCfg AuthConfig) http.Handler
return
}
organizationID, _ := gid.ParseGID("AZSfP_xAcAC5IAAAAAAltA")
err = usrmgrSvc.AddUserToOrganization(r.Context(), user.ID, organizationID)
if err != nil {
http.Error(w, fmt.Sprintf("Failed to add user to organization: %v", err), http.StatusInternalServerError)
return
}
// Log the user in
session, err := usrmgrSvc.Login(r.Context(), req.Email, req.Password)
if err != nil {