mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-07 21:01:53 +00:00
Revert "feat: implement register Passkey user API v2 (#5873)"
This reverts commit a301c40f9f.
This commit is contained in:
@@ -4,10 +4,12 @@ import (
|
||||
"io"
|
||||
"regexp"
|
||||
"strings"
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/crypto"
|
||||
"github.com/zitadel/zitadel/internal/errors"
|
||||
caos_errs "github.com/zitadel/zitadel/internal/errors"
|
||||
es_models "github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
||||
)
|
||||
|
||||
@@ -71,8 +73,19 @@ type ConfirmURLData struct {
|
||||
OrgID string
|
||||
}
|
||||
|
||||
// RenderConfirmURLTemplate parses and renders tmpl.
|
||||
// RenderConfirmURLTemplate parses and renders tmplStr.
|
||||
// userID, code and orgID are passed into the [ConfirmURLData].
|
||||
func RenderConfirmURLTemplate(w io.Writer, tmpl, userID, code, orgID string) error {
|
||||
return renderURLTemplate(w, tmpl, &ConfirmURLData{userID, code, orgID})
|
||||
// "%s%s?userID=%s&code=%s&orgID=%s"
|
||||
func RenderConfirmURLTemplate(w io.Writer, tmplStr, userID, code, orgID string) error {
|
||||
tmpl, err := template.New("").Parse(tmplStr)
|
||||
if err != nil {
|
||||
return caos_errs.ThrowInvalidArgument(err, "USERv2-ooD8p", "Errors.User.Email.InvalidURLTemplate")
|
||||
}
|
||||
|
||||
data := &ConfirmURLData{userID, code, orgID}
|
||||
if err = tmpl.Execute(w, data); err != nil {
|
||||
return caos_errs.ThrowInvalidArgument(err, "USERv2-ohSi5", "Errors.User.Email.InvalidURLTemplate")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user