feat: request registration process by prompt (#1798)

* feat: request registration process by prompt

* fix merge

* add prompt create to docs
This commit is contained in:
Livio Amstutz
2021-06-14 10:40:38 +02:00
committed by GitHub
parent 770994e143
commit ab78b34c6c
9 changed files with 31 additions and 13 deletions
@@ -3,10 +3,10 @@ package handler
import (
"net/http"
"github.com/caos/zitadel/internal/domain"
"golang.org/x/text/language"
http_mw "github.com/caos/zitadel/internal/api/http/middleware"
"github.com/caos/zitadel/internal/domain"
caos_errs "github.com/caos/zitadel/internal/errors"
)
@@ -82,7 +82,12 @@ func (l *Login) handleRegisterCheck(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, l.zitadelURL, http.StatusFound)
return
}
authRequest.LoginName = user.PreferredLoginName
userAgentID, _ := http_mw.UserAgentIDFromCtx(r.Context())
err = l.authRepo.SelectUser(r.Context(), authRequest.ID, user.AggregateID, userAgentID)
if err != nil {
l.renderRegister(w, r, authRequest, data, err)
return
}
l.renderNextStep(w, r, authRequest)
}