Email & Password

Learn how to sign up and sign in to Kindship using email and password.

The traditional way to access Kindship — sign up with your email address and create a secure password.

Creating Your Account

Step 1: Go to Sign Up

Visit kindship.ai and click Sign Up or Get Started.

Step 2: Enter Your Details

Fill in the sign-up form:

  • Email Address — Use an email you have access to
  • Password — Create a secure password (see requirements below)

Step 3: Verify Your Email

After signing up:

  1. Check your email inbox for a verification message
  2. Click the verification link in the email
  3. Your account is now active

import { enhanceAction } from '@kit/next/actions'; import * as z from 'zod';

const SignUpSchema = z.object({ email: z.string().email(), password: z.string().min(8), });

export const signUpAction = enhanceAction( async (data) => { const client = getSupabaseServerClient();

const { data: authData, error } = await client.auth.signUp({ email: data.email, password: data.password, options: { emailRedirectTo: ${process.env.NEXT_PUBLIC_SITE_URL}/auth/callback, }, });

if (error) throw error;

return { success: true, data: authData }; }, { schema: SignUpSchema } );


### Sign Up Component

```tsx
'use client';

import { useForm } from 'react-hook-form';
import { signUpAction } from '../_lib/actions';

export function SignUpForm() {
  const { register, handleSubmit, formState: { errors } } = useForm();

  const onSubmit = async (data) => {
    const result = await signUpAction(data);

    if (result.success) {
      toast.success('Check your email to confirm your account');
    }
  };

  return (
    <form onSubmit={handleSubmit(onSubmit)}>
      <div>
        <label>Email</label>
        <input
          type="email"
          {...register('email', { required: true })}
        />
        {errors.email && <span>Email is required</span>}
      </div>

      <div>
        <label>Password</label>
        <input
          type="password"
          {...register('password', { required: true, minLength: 8 })}
        />
        {errors.password && <span>Password must be 8+ characters</span>}
      </div>

      <button type="submit">Sign Up</button>
    </form>
  );
}

Sign In Flow

User Login

export const signInAction = enhanceAction(
  async (data) => {
    const client = getSupabaseServerClient();

    const { error } = await client.auth.signInWithPassword({
      email: data.email,
      password: data.password,
    });

    if (error) throw error;

    redirect('/home');
  },
  { schema: SignInSchema }
);

Sign In Component

'use client';

export function SignInForm() {
  const { register, handleSubmit } = useForm();

  const onSubmit = async (data) => {
    try {
      await signInAction(data);
    } catch (error) {
      toast.error('Invalid email or password');
    }
  };

  return (
    <form onSubmit={handleSubmit(onSubmit)}>
      <input
        type="email"
        {...register('email')}
        placeholder="Email"
      />
      <input
        type="password"
        {...register('password')}
        placeholder="Password"
      />
      <button type="submit">Sign In</button>
    </form>
  );
}

Email Verification

Requiring Email Confirmation

Configure in Supabase dashboard or config:

// config/auth.config.ts
export const authConfig = {
  requireEmailConfirmation: true,
};

Handling Unconfirmed Emails

export const signInAction = enhanceAction(
  async (data) => {
    const client = getSupabaseServerClient();

    const { data: authData, error } = await client.auth.signInWithPassword({
      email: data.email,
      password: data.password,
    });

    if (error) {
      if (error.message.includes('Email not confirmed')) {
        return {
          success: false,
          error: 'Please confirm your email before signing in',
        };
      }
      throw error;
    }

    redirect('/home');
  },
  { schema: SignInSchema }
);

Password Reset

Request Password Reset

export const requestPasswordResetAction = enhanceAction(
  async (data) => {
    const client = getSupabaseServerClient();

    const { error } = await client.auth.resetPasswordForEmail(data.email, {
      redirectTo: `${process.env.NEXT_PUBLIC_SITE_URL}/auth/reset-password`,
    });

    if (error) throw error;

    return {
      success: true,
      message: 'Check your email for reset instructions',
    };
  },
  {
    schema: z.object({
      email: z.string().email(),
    }),
  }
);

Reset Password Form

'use client';

export function PasswordResetRequestForm() {
  const { register, handleSubmit } = useForm();

  const onSubmit = async (data) => {
    const result = await requestPasswordResetAction(data);

    if (result.success) {
      toast.success(result.message);
    }
  };

  return (
    <form onSubmit={handleSubmit(onSubmit)}>
      <input
        type="email"
        {...register('email')}
        placeholder="Enter your email"
      />
      <button type="submit">Send Reset Link</button>
    </form>
  );
}

Update Password

export const updatePasswordAction = enhanceAction(
  async (data) => {
    const client = getSupabaseServerClient();

    const { error } = await client.auth.updateUser({
      password: data.newPassword,
    });

    if (error) throw error;

    redirect('/home');
  },
  {
    schema: z.object({
      newPassword: z.string().min(8),
    }),
  }
);

Password Requirements

Your password should be:

  • At least 8 characters — Longer is better
  • Mixed case — Include uppercase and lowercase letters
  • Numbers — Include at least one number
  • Special characters — Include symbols like !@#$%

A strong password might look like: MyKindship2025!

Avoid passwords that:

  • Are easy to guess (password123, your name)
  • Are used on other sites
  • Are based on personal information (birthday, pet name)

Signing In

Regular Sign-In

  1. Go to kindship.ai and click Sign In
  2. Enter your email address
  3. Enter your password
  4. Click Sign In

Remember Me

If you check "Remember me" when signing in:

  • Your session stays active longer
  • You won't need to sign in as often
  • Don't use this on shared computers

Password Reset

Forgot your password? Here's how to reset it:

Step 1: Request Reset

  1. Go to the sign-in page
  2. Click Forgot Password
  3. Enter your email address
  4. Click Send Reset Link

Step 2: Check Your Email

You'll receive an email with a password reset link. This link expires after a set time (usually 1 hour), so act promptly.

Step 3: Create New Password

  1. Click the reset link in your email
  2. Enter your new password
  3. Confirm your new password
  4. Click Reset Password

You'll be signed in automatically with your new password.

Changing Your Password

To update your password while signed in:

  1. Go to Settings > Security
  2. Click Change Password
  3. Enter your current password
  4. Enter your new password
  5. Confirm your new password
  6. Click Update Password

Security Tips

Use a Password Manager

Password managers help you:

  • Generate strong, unique passwords
  • Store passwords securely
  • Auto-fill sign-in forms

Popular options include 1Password, Bitwarden, and Dashlane.

Don't Reuse Passwords

Using the same password across multiple sites is risky. If one site is compromised, all your accounts are at risk.

Watch for Phishing

Always check that you're on the real Kindship site before entering your password. Look for:

  • The correct URL (kindship.ai)
  • HTTPS in the address bar
  • No spelling mistakes or suspicious elements

Troubleshooting

Wrong Password

  • Make sure Caps Lock is off
  • Try typing your password in a text field first to see it
  • Use password reset if you've forgotten it

Email Not Found

  • Check for typos in your email
  • Make sure you're using the email you signed up with
  • You might need to sign up if you haven't before

Account Locked

After several failed attempts, your account may be temporarily locked for security. Wait 15 minutes and try again.

Reset Email Not Arriving

  • Check spam/junk folders
  • Verify you entered the correct email
  • Request a new reset email
  • Add kindship.ai to your email allowlist

Linking Other Sign-In Methods

You can add additional sign-in methods to your account:

  1. Go to Settings > Security
  2. Find Connected Accounts
  3. Click to add Google, GitHub, or other providers

This gives you more ways to access your account.

Next Steps