/v1/apps/{app_id}/sign-in-tests/{test_id}AuthGet a sign-in test and its result.
Poll this after opening `start_url`. `state` turns `succeeded` (with `outcome` and `identity`) or `failed` (with `error.fix`). A test that is never finished turns `failed` with code `expired` 15 minutes after it was created.
Path parameters
app_id*stringId of the app.
test_id*string · uuidId of the test.
Response · 200
id*string · uuidUnique identifier of the sign-in test.
Example: "6f1c2b8e-3a4d-4e5f-8a9b-0c1d2e3f4a5b"
app_id*string · uuidThe Auth app the sign-in test belongs to.
Example: "0b6f3c7e-6a43-4c55-9d4b-2a9a7f5b1c11"
method*object`oauth` (sign in at a provider in a popup) or `password` (checks the sign-up and sign-in rules and sends the test emails).
Example: "oauth"
provider*stringThe provider tested (`oauth` tests), or `null`. The sign-in provider: `apple`, `google`, `github`, `microsoft`, or `oidc-<key>` for an OpenID Connect provider you added (the key is 1 to 32 lowercase letters, digits or hyphens that you choose, for example `oidc-okta`).
Example: "google"
state*object`pending`: waiting for the sign-in at the provider (open `start_url`). `succeeded`: the sign-in would work; see `outcome` and `identity`. `failed`: see `error` for the fix. A test that is never finished becomes `failed` with code `expired`.
Example: "pending"
outcome*objectWhat a real sign-in would have done: sign in an existing user, or create a new one. The test itself never creates or links an account.
Example: "would_create"
identity*objectWho signed in during the test, once it completes; `null` before that.
error*objectWhy the test failed, or `null`.
email_delivery*objectSucceeded `password` / `otp` tests: whether the email went out. A `password` test passes even when it did not, because real sign-up and sign-in do not need it; `notice` says why and how to turn it on. Null for `oauth` tests and failed tests.
start_url*string · uriOAuth tests only: open this in a popup to sign in at the provider. Works once, until `expires_at`. Null once used, for password and email-code tests, and when the test already failed its checks.
Example: "https://api.auth.productcraft.co/acme/v1/auth/oauth/google/authorize?return_to=https%3A%2F%2Fconsole.productcraft.co%2Fauth%2Fsign-in-test%2Fcallback&sign_in_test=6f1c2b8e-3a4d-4e5f-8a9b-0c1d2e3f4a5b"
callback_host*string · hostnameThe custom domain the test runs on (`custom_domain: true`), or null for the canonical host. The start link is on this host and the provider is sent its callback URL, `https://<callback_host>/v1/auth/oauth/<provider>/callback`.
Example: "auth.acme.com"
expires_at*string · date-timeThe start link works until then (10 minutes).
created_at*string · date-timeWhen the sign-in test was created (ISO 8601).
completed_at*string · date-timeWhen the test completed (ISO 8601), or `null` while it runs.
Example
Request
GET https://api.auth.productcraft.co/v1/apps/{app_id}/sign-in-tests/{test_id}
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const signInTest = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").signInTests.retrieve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");auth.admin.app(…).signInTests.retrieve(testId, options?): Auth.SignInTest
Response
{
"id": "6f1c2b8e-3a4d-4e5f-8a9b-0c1d2e3f4a5b",
"app_id": "0b6f3c7e-6a43-4c55-9d4b-2a9a7f5b1c11",
"method": "oauth",
"provider": "google",
"state": "pending",
"outcome": "would_create",
"identity": {},
"error": {},
"email_delivery": {},
"start_url": "https://api.auth.productcraft.co/acme/v1/auth/oauth/google/authorize?return_to=https%3A%2F%2Fconsole.productcraft.co%2Fauth%2Fsign-in-test%2Fcallback&sign_in_test=6f1c2b8e-3a4d-4e5f-8a9b-0c1d2e3f4a5b",
"callback_host": "auth.acme.com",
"expires_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"completed_at": "2026-01-01T00:00:00.000Z"
}