 (defprotocol WelcomeRenderer
   (render-welcome [_ req model]))
 
+(defprotocol EmailVerifiedRenderer
+  (render-email-verified [_ req model]))
+
+(defprotocol ResetPasswordRenderer
+  (render-reset-password [_ req model]))
+
 
 ;; One simple component that does signup, reset password, login form. etc.
 ;; Mostly you want something simple that works which you can tweak later - you can provide your own implementation based on the reference implementation

                        (format "Sorry but there were problems trying to retrieve your data related with your mail '%s' " (get (:params req) "email"))
                        )]
             {:status 200
              :body body}
             ))
         wrap-params)

     ::reset-password
     (fn [req] {:status 200 :body "Thanks"})
     })

  (routes [this]
    ["/" {"signup" {:get ::signup-form
                    :post ::process-signup}
          "welcome" {:get ::welcome-new-user}
          "verify-email" {:get ::verify-user-email}}])

  (uri-context [this] ""))


                         {:name "password" :label "Password" :password? true :placeholder "password"}
                         {:name "name" :label "Name" :placeholder "name"}
                         {:name "email" :label "Email" :placeholder "email"}]
                :fields-reset [
                               {:name "old_pw" :label "Old Password" :password? true :placeholder "old password"}
                               {:name "new_pw" :label "New Password" :password? true :placeholder "new password"}
                               {:name "new_pw_bis" :label "Repeat New Password" :password? true :placeholder "repeat new password"}]
                })
        (s/validate {:appname s/Str
                     :fields [{:name s/Str
                               :label s/Str
                               (s/optional-key :placeholder) s/Str
                               (s/optional-key :password?) s/Bool}]
                     :fields-reset [{:name s/Str
                                     :label s/Str
                                     (s/optional-key :placeholder) s/Str
                                     (s/optional-key :password?) s/Bool}]
                     (s/optional-key :emailer) (s/protocol Emailer)})
        map->SignupWithTotp)
   [:user-domain :session-store :renderer :verification-code-store ]))
