feat: implement passkey registration flow

This commit is contained in:
Prad Nukala
2024-12-09 16:23:18 -05:00
parent 27d4dfcdfd
commit 0e8b92e53d
11 changed files with 182 additions and 82 deletions
@@ -6,11 +6,11 @@ import (
"github.com/onsonr/sonr/pkg/blocks/text"
)
templ ProfileFormView(turnstileSiteKey string) {
templ ProfileFormView(data forms.CreateProfileData) {
@layout.Root("New Profile | Sonr.ID") {
@layout.Container() {
@text.Header("Create a Profile", "Enter some basic information about yourself.")
@forms.CreateProfile("/register/start", "POST")
@forms.CreateProfile("/register/start", "POST", data)
}
}
}
@@ -14,7 +14,7 @@ import (
"github.com/onsonr/sonr/pkg/blocks/text"
)
func ProfileFormView(turnstileSiteKey string) templ.Component {
func ProfileFormView(data forms.CreateProfileData) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
@@ -67,7 +67,7 @@ func ProfileFormView(turnstileSiteKey string) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = forms.CreateProfile("/register/start", "POST").Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = forms.CreateProfile("/register/start", "POST", data).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}