mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-27 23:21:09 +00:00

* fix: render favicon from label policy * translate main title * translation * i18n * i18n * i18nkey * rm attr * select user title * Add description meta * Update internal/api/ui/login/mfa_init_verify_handler.go Co-authored-by: Livio Spring <livio.a@gmail.com> * Update internal/api/ui/login/renderer.go Co-authored-by: Livio Spring <livio.a@gmail.com> * merge ifs * use errors.internal * check for i18ndescriptionkey * missing i18n Co-authored-by: Livio Spring <livio.a@gmail.com>
25 lines
943 B
Go
25 lines
943 B
Go
package login
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
http_mw "github.com/zitadel/zitadel/internal/api/http/middleware"
|
|
"github.com/zitadel/zitadel/internal/domain"
|
|
)
|
|
|
|
const (
|
|
tmplLinkUsersDone = "linkusersdone"
|
|
)
|
|
|
|
func (l *Login) linkUsers(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest, err error) {
|
|
userAgentID, _ := http_mw.UserAgentIDFromCtx(r.Context())
|
|
err = l.authRepo.LinkExternalUsers(setContext(r.Context(), authReq.UserOrgID), authReq.ID, userAgentID, domain.BrowserInfoFromRequest(r))
|
|
l.renderLinkUsersDone(w, r, authReq, err)
|
|
}
|
|
|
|
func (l *Login) renderLinkUsersDone(w http.ResponseWriter, r *http.Request, authReq *domain.AuthRequest, err error) {
|
|
var errType, errMessage string
|
|
data := l.getUserData(r, authReq, "LinkingUsersDone.Title", "LinkingUsersDone.Description", errType, errMessage)
|
|
l.renderer.RenderTemplate(w, r, l.getTranslator(r.Context(), authReq), l.renderer.Templates[tmplLinkUsersDone], data, nil)
|
|
}
|