Zum Inhalt springen

User Authentication with Credentials (Email and Password)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

LaunchFast uses in house simple as heck server-side first Credentials (Email & Password) authentication to help you authenticate users easily with any database provider.

You can configure it in the src/pages/api/sign directory.

To simply authenticate users via credentials (email and password), make a HTML form POSTing to the sign in/up APIs. Here’s how you’d create a simple form in each framework:

src/pages/signin.astro
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
</head>
<body>
<form action="/api/sign/in" method="POST">
<div>
<label for="email">Email address</label>
<input
required
id="email"
name="email"
type="email"
autocomplete="email"
/>
</div>
<div>
<label for="password">Password</label>
<input
required
id="password"
name="password"
type="password"
autocomplete="current-password"
/>
</div>
<button type="submit">
Sign in
</button>
</form>
</body>
</html>