# First name without family name

Check that your app handles a profile with only a first name. Sign in as `you+firstname@example.com` to exercise this provider behavior.

Use your own Mockatoo address with firstname and your usual password. Combine tags with a dot, for example `you+firstname.unverified@example.com`; see [Email tags](../email-tags.md).

## What each provider returns

Google returns a first name but no family name.

| Provider | What your app gets |
| --- | --- |
| [Google](../providers/google.md) | Only a first name: name and given_name, no family_name. |

## Test it with Playwright

This test signs in with Google as `you+firstname@example.com` and checks that sign-in completes. It reads MOCKATOO_TEST_EMAIL and MOCKATOO_TEST_PASSWORD from the environment.

```ts
import { expect, test } from "@playwright/test";

const email = process.env.MOCKATOO_TEST_EMAIL ?? "";
const password = process.env.MOCKATOO_TEST_PASSWORD ?? "";

test("+firstname: displays a name without a surname", async ({ page }) => {
	const address = email.replace("@", `+e2e-${crypto.randomUUID()}.firstname@`);
	// The app must accept a profile with only a first name.
	await page.goto("/");
	await page.getByRole("button", { name: "Sign in with Google" }).click();
	await page.getByLabel("Email", { exact: true }).fill(address);
	await page.getByLabel("Password", { exact: true }).fill(password);
	await page.getByRole("button", { name: "Log in with password" }).click();
	await page.getByRole("button", { name: "Authorize" }).click();
	await expect(page.getByRole("heading", { name: "Your session" })).toBeVisible(
		{ timeout: 15_000 },
	);
	const user = JSON.parse(
		(await page.locator("pre code").textContent()) ?? "",
	).user;
	expect(user.email).toBe(address);
	expect(user.name.trim().split(/\s+/)).toHaveLength(1);
	expect(user.name).not.toBe("");
});
```

It runs in CI as [tests/tags/firstname.spec.ts](https://github.com/mockatoo/examples/blob/main/better-auth-next/tests/tags/firstname.spec.ts) in the Better Auth + Next.js example.
