Skip to content

Instantly share code, notes, and snippets.

@samuelgoto
Created April 30, 2026 20:26
Show Gist options
  • Select an option

  • Save samuelgoto/e76e88a9ea9d3e82cacb8d4fd83d4323 to your computer and use it in GitHub Desktop.

Select an option

Save samuelgoto/e76e88a9ea9d3e82cacb8d4fd83d4323 to your computer and use it in GitHub Desktop.
<form action="signup.php" method="POST">
  <input type="email" name="email" autocomplete="email" nonce="1234">
  <input type="hidden" name="token" autocomplete="email-verification">
</form>
@samuelgoto
Copy link
Copy Markdown
Author

  <input type="email-verification" name="token">

@samuelgoto
Copy link
Copy Markdown
Author

samuelgoto commented Apr 30, 2026

<script>
const {token} = await navigator.credentials.get({
  mediation: "conditional",
  email: {
    nonce: "1234"
  }
});
document.getElementByName("token").value = token;
</script>
<form action="signup.php" method="POST">
  <input type="email" name="email" autocomplete="email email-verificaiton">
  <input type="hidden" name="token">
</form>

@samuelgoto
Copy link
Copy Markdown
Author

samuelgoto commented Apr 30, 2026

<form action="signup.php" method="POST">
  <input type="email" name="email" autocomplete="email" verificaitonchallenge="1234">
</form>
POST signup.php
email=foobar@gmail.com&email.__verification__=456

@samuelgoto
Copy link
Copy Markdown
Author

samuelgoto commented Apr 30, 2026

<form action="signup.php" method="POST">
  <input type="email" name="email" autocomplete="email" >
  <nonce for="email" value="1234"></nonce>
</form>
POST signup.php
email=foobar@gmail.com&email.__verification__=456

@samuelgoto
Copy link
Copy Markdown
Author

samuelgoto commented Apr 30, 2026

<form action="signup.php" method="POST">
  <input type="email" name="email" autocomplete="email" >
  <!-- This wouldn't work because type="verification" degrades to type="text" when the browser doesn't support it -->
  <input type="verification" for="email" nonce="1234" name="token">
</form>
POST signup.php
email=foobar@gmail.com&token=456

@samuelgoto
Copy link
Copy Markdown
Author

samuelgoto commented Apr 30, 2026

<script>
new EmailVerifier({
    nonce: "1234",
});
</script>
<form action="signup.php" method="POST">
  <input type="email" name="email" autocomplete="email">
</form>

@samuelgoto
Copy link
Copy Markdown
Author

<form action="signup.php" method="POST">
  <input type="tel" name="tel" autocomplete="tel" >
  <input type="verification" for="tel" nonce="1234" name="token">
</form>

@samuelgoto
Copy link
Copy Markdown
Author

samuelgoto commented May 1, 2026

<form action="signup.php" method="POST">
  <input type="email" name="email" autocomplete="email">
  <!-- one neat property of this is that this is a one-liner that developers can copy/paste on their forms -->
  <input type="hidden" name="token" nonce="1234" autocomplete="email-verification-token">
</form>

@mohamedamir
Copy link
Copy Markdown

<form action="/register" method="POST" verify-identity="email" identity-nonce="xyz123">
  <input type="email" name="user_email">
  <button type="submit">Register</button>
</form>

And the proof is returned in a special HTTP Header

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment