feat: implement passkey registration flow

This commit is contained in:
Prad Nukala
2024-12-08 23:10:40 -05:00
parent e0ebe92361
commit 5280209075
5 changed files with 146 additions and 57 deletions
@@ -122,7 +122,7 @@ func ProfileFormView(turnstileSiteKey string) templ.Component {
})
}
func LinkCredentialView(addr string, handle string, registerOptions form.RegisterOptions) templ.Component {
func LinkCredentialView(addr string, handle string, name string, challenge string) 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 {
@@ -219,7 +219,7 @@ func LinkCredentialView(addr string, handle string, registerOptions form.Registe
}
return templ_7745c5c3_Err
})
templ_7745c5c3_Err = form.Form("/register/finish", "POST", form.PasskeyInput(registerOptions), "65", false).Render(templ.WithChildren(ctx, templ_7745c5c3_Var8), templ_7745c5c3_Buffer)
templ_7745c5c3_Err = form.Form("/register/finish", "POST", form.PasskeyInput(addr, handle, name, challenge), "65", false).Render(templ.WithChildren(ctx, templ_7745c5c3_Var8), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}