API
/signin
email — string, email password — string, length >= 8
<form action="/signin" method="POST">
<input type="email" name="email"/>
<input type="password" name="password"/>
<button type="submit">Sign In</button>
</form>
curl -X POST \
-d "email=email&password=password" \
-H "Origin: https://yourwebsite.com" \
https://auth.yourwebsite.com/signin
/signup
email — string, email password — string, length >= 8
<form hx-post="/signup" hx-target="#signup-response" hx-swap="innerHTML" class="space-y-4">
<input type="email" name="email" placeholder="Email" class="border p-2 w-full" />
<input type="password" name="password" placeholder="Password" class="border p-2 w-full" />
<button type="submit" class="bg-blue-500 text-white p-2 w-full">Sign Up</button>
</form>
<div id="signup-response"></div>
curl -X POST \
-d "email=email&password=password" \
-H "Origin: https://yourwebsite.com" \
https://auth.yourwebsite.com/signup
/signout
(no params)
<form hx-post="/signout" hx-target="#signout-response" hx-swap="innerHTML" class="space-y-4">
<button type="submit" class="bg-blue-500 text-white p-2 w-full">Sign Out</button>
</form>
<div id="signout-response"></div>
curl -X POST \
-H "Origin: https://yourwebsite.com" \
https://auth.yourwebsite.com/signout
/send-password-reset-link
email — string, email
<h2 class="text-xl font-semibold mb-4">/send-password-reset-link</h2>
<form hx-post="/send-password-reset-link" hx-target="#send-password-reset-link-response" hx-swap="innerHTML" class="space-y-4">
<input type="email" name="email" placeholder="Email" class="border p-2 w-full" />
<button type="submit" class="bg-blue-500 text-white p-2 w-full">Send Password Reset Link</button>
</form>
<div id="send-password-reset-link-response"></div>
curl -X POST \
-d "email=email" \
-H "Origin: https://yourwebsite.com" \
https://auth.yourwebsite.com/send-password-reset-link
/password-reset-token
token — string
<form hx-post="/password-reset-token" hx-target="#password-reset-token-response" hx-swap="innerHTML" class="space-y-4">
<input type="text" name="token" placeholder="Token" class="border p-2 w-full" />
<input type="password" name="password" placeholder="New Password" class="border p-2 w-full" />
<button type="submit" class="bg-blue-500 text-white p-2 w-full">Submit New Password</button>
</form>
<div id="password-reset-token-response"></div>
curl -X POST \
-d "token=123&password=password" \
-H "Origin: https://yourwebsite.com" \
https://auth.yourwebsite.com/password-reset-token
/send-email-verification-link
(no params)
<form
hx-post="/send-email-verification-link"
hx-target="#send-email-verification-link-response"
hx-swap="innerHTML"
class="space-y-4"
>
<button type="submit" class="bg-blue-500 text-white p-2 w-full">Send Email Verification Link</button>
</form>
<div id="send-email-verification-link-response"></div>
curl -X POST \
-H "Origin: https://yourwebsite.com" \
https://auth.yourwebsite.com/send-email-verification-link