Add a page to re-send email verification if signing in without verified email
[ndcode_site.git] / _lib / navbar.jst
index c6ff55f..ea1f056 100644 (file)
@@ -360,6 +360,14 @@ return async (env, head, body, scripts) => {
                   )
                 }
                 catch (error) {
+                  if (
+                    error instanceof Problem &&
+                      error.title === 'Email not yet verified'
+                  ) {
+                    location.href = `/my_account/send_verification_email?email=${encodeURIComponent(email)}`
+                    return
+                  }
+
                   document.getElementById('message-modal-message').textContent = error.message
                   $('#sign-in-modal').modal('hide')
                   $('#message-modal').modal('show')