---
updatedAt: 2026-08-19T17:32:16.000Z
agentTools:
  projectIndex: https://docs.wristband.dev/llms.txt
---

# Test Auth Flows

Run these tests to verify that your authentication endpoints work correctly.

<Callout icon="🤔" theme="default">
  ### Tests not working?

  If you get stuck, <Anchor target="_blank" href="https://docs.wristband.dev/docs/support">contact us</Anchor> — our development team will work directly with you to get unblocked.
</Callout>

Test basic authentication flows to verify your new endpoints work correctly.

<Callout icon="⚠️" theme="warn">
  ### Before You Begin

  Start your express server before running the tests below.
</Callout>

## Test 1: Verify Signup Flow

First, test the Application-Level Signup flow by following these steps.

1. Select your application from the Dashboard Home Page.

<Image src="https://files.readme.io/2c939655d2d2d63898ba0dfa21ee4d0cea8768960db1aeb1e8880e801d52c643-select_app.png" alt="Select application" align="center" width="700px" caption="Figure 1: Select your Wristband application." />

2. Expand the Application URLs accordion on the settings page. Click the external link icon next to the Application-level Signup URL field.

<Image src="https://files.readme.io/6a369abd3ce623f736a32c3a7fe49589235cdadca838f118b0017c6812020927-application-level_signup_URL.png" align="center" width="700px" caption="Figure 2: Open the Application-level Signup URL." />

3. The link opens the Application-Level Signup page in a new browser tab. Fill out the form and submit it to create your new tenant.

   1. **Tenant Name** - The name of the tenant that application-level signup creates under your application.
   2. **Email** - A valid email address you have access to. You'll need to view an activation email sent here to complete signup.
   3. **Password** - The password you'll use to log in.The password that you will use to log in.
   4. &#x20;Click **Sign Up**.

<Image src="https://files.readme.io/7c97c83fb4fdaef35fa30d9a22b3b8a49deb8900393ad853da4e05cdcad65f37-Screenshot_2025-09-26_at_8.46.33_PM.png" alt="Application-level signup" align="center" width="400px" caption="Figure 3: Complete the signup form." />

4. Check your inbox for a verification email containing a one-time code. Enter this code into the form to complete your signup.

<Image src="https://files.readme.io/da3910ed9ca96391dc954c8c46c76164945d0ceac7f8300f149cfc51bb6f68bc-Screenshot_2025-09-26_at_9.00.54_PM.png" alt="Verification code page" align="center" width="400px" caption="Figure 4: Verify the signup email address." />

5. When the signup process succeeds, you are automatically redirected to your application's home page. This matches the default return URL you previously configured in your <Anchor target="_blank" href="https://docs.wristband.dev/docs/django-add-auth-endpoints#callback-endpoint">Callback Endpoint</Anchor>.

Congratulations, you successfully completed the Application-Level Signup flow! Here is a summary of the operations performed behind the scenes during this process.

Automated Background Operations

1. Tenant creation: A new tenant was generated under your application using your input name.
2. User creation: A new user profile was built under that tenant with your credentials.
3. Account activation: The user account was verified and activated via the email code.
4. Session initiation: A secure Wristband authentication session was established for the user.

***

## Test 2: Verify Login Flow

Test the user login flow next. You must first clear any active sessions so you do not bypass the login screen.

### Clearing the User's Active Auth Sessions

Clear your user's active authentication sessions by following these setup steps.

1. Go to the Dashboard Home Page.

<Image src="https://files.readme.io/2c939655d2d2d63898ba0dfa21ee4d0cea8768960db1aeb1e8880e801d52c643-select_app.png" alt="Select application" align="center" width="700px" caption="Figure 5: Select your Wristband application." />

2. Locate and open the user profile you created during the signup test.

   Step-by-Step Instructions:

   1. Click **Users** in the navigation bar.
   2. Find the user in the **Users table**.
   3. Click the user's row to open their profile.

<Image src="https://files.readme.io/7ac8891309f782f9d4b30f5121318726ec8202f6c2966e1b590b0832de56558a-Screenshot_2025-09-26_at_9.50.58_PM.png" alt="Select user" align="center" width="700px" caption="Figure 6: Select the new user." />

3. Remove the active session directly from the user's profile settings.

   Step-by-Step Instructions:

   1. Scroll down to the **Active Auth Sessions** section.
   2. Click the **Delete Sessions** button.

<Image src="https://files.readme.io/637818ce5cceab0440c871210cf04059e5cba04df60847575d20bbab538ac211-delete_sessions.png" align="center" width="700px" caption="Figure 7: Clear the user's active auth sessions." />

### Perform User Login

1. Now that you have cleared the active sessions, start the user login flow test by accessing your app configuration.

   Step-by-Step Instructions:

   1. Open Your **App**.
   2. Go to the **Dashboard Home Page**.
   3. Click your specific **application** name.

<br />

<Image src="https://files.readme.io/2c939655d2d2d63898ba0dfa21ee4d0cea8768960db1aeb1e8880e801d52c643-select_app.png" alt="Select application" align="center" width="700px" caption="Figure 8: Select your Wristband application." />

2. Expand the Application URLs accordion menu on the settings page. Click the external link icon next to the Application-level Login URL field.

   Step-by-Step Instructions:

   1. Scroll down to **Application URLs**.
   2. Click the section **heade**r to expand.
   3. Find the **Application-level Login URL** field.
   4. Click the **external link icon** next to it.

<Image src="https://files.readme.io/4a9ee46bc0ecfec51f0f9eb88f8242baf677ddb9f0d3ae9f9442ab0616135954-app-level-login-url.png" align="center" width="700px" caption="Figure 9: Open the Application-level Login URL." />

3. The link opens the Application-Level Login page in a new browser tab. Select your previously created tenant to proceed to the login form.

   Step-by-Step Instructions:

   1. Look at the listed tenants you previously **authenticated** with.
   2. Find the **tenant&#x20;**&#x79;ou created during the signup flow.
   3. Click the **Select&#x20;**&#x62;utton next to that tenant.

<Image src="https://files.readme.io/59200bb8a4764086140223e802a4f3e2c2d96d230d93555f390def7750648c43-tenant-discovery.png" align="center" width="300px" caption="Figure 10: Select your tenant." framed={true} />

4. You should now see the login page for the selected tenant. Enter your credentials to log in.

   Step-by-Step Instructions:

   1. Enter the **email** used during signup.
   2. Enter your **password**.
   3. Click the **Log In** button.

<Image src="https://files.readme.io/246db0aacdaf3a09e4c8dedfe06f1c23069fdea80c5aa0c5f51fdeb4cc35b187-Screenshot_2025-09-27_at_11.04.38_AM.png" alt="Tenant login page" align="center" width="300px" caption="Figure 11: Log in as the new user." />

5. If login succeeds, you're redirected to the URL specified as the final redirect in your Callback Endpoint (set up in the <Anchor target="_blank" href="https://docs.wristband.dev/docs/fastapi-add-auth-endpoints#callback-endpoint">Add Auth Endpoints</Anchor> step) — typically your application's home page.

***

## Test 3: Verify Auth Session

1. Revisiting the login page with an active session will bypass the credential prompt and log you in automatically. Follow these steps to verify this behavior.

   Step-by-Step Instructions:

   1. Open the **Login Page.**
   2. Enter your **Application-Level Login UR**L into your browser.
      **Note:&#x20;**&#x49;f needed, find this URL on the **Application Settings** page under the **Application URLs** section.

<Image src="https://files.readme.io/4a9ee46bc0ecfec51f0f9eb88f8242baf677ddb9f0d3ae9f9442ab0616135954-app-level-login-url.png" align="center" width="700px" caption="Figure 12: Open the application-level login URL." />

2. Select your previously used tenant to trigger the session detection check.

   Step-by-Step Instructions:

   1. Look at the listed tenants on the page.
   2. Find the **tenant** you logged into during the previous test.
   3. Click the **Select** button next to it.
   4. Wait for the page to redirect you to that tenant's **specific login** page.

<br />

<Image src="https://files.readme.io/59200bb8a4764086140223e802a4f3e2c2d96d230d93555f390def7750648c43-tenant-discovery.png" align="center" width="300px" caption="Figure 13: Select the tenant you created during signup." />

3. Because your user has an active session, Wristband will skip the credential prompts entirely. You will be logged in immediately and sent back to your application's home page.

   Expected Behavior:

   1. **Bypass credentials**: The username and password form fields will not appear.
   2. **Automatic redirection:** The browser automatically processes the session data.
   3. **Home page landing:** You will land directly on your default callback destination.

***

## Test 4: Verify Logout

1. To terminate your user's session, navigate directly to your local application logout route. This triggers the required cleanup logic and redirects you safely to the login screen.

   Step-by-Step Instructions:

   1. Type your **Logout Endpoint URL** into the browser address bar (e.g., http\://localhost:8080/auth/logout ).
   2. Press **Enter** to execute the logout route code.
   3. Confirm that you are automatically redirected to your tenant's login page.

      <Image src="https://files.readme.io/8758ec77fb7bfdffc761e240f3857315ed7d24dd24b035b9e0091f2d945753e7-image.png" align="center" caption="Figure 14: After logout, Wristband prompts the user to sign in again." />

2. Seeing the credential prompts on the tenant login page confirms your session has been terminated. This indicates that your logout flow successfully cleared all local and server-side authentication states.

Success Criteria:

* **Form visible:** The email and password inputs appear on the screen again.
* **Session cleared:** No automated redirects bypass this screen.
* **State validated:** The workflow successfully restored an unauthenticated state.

If you've reached this point, congratulations! Your Auth Endpoints are working correctly.

<HTMLBlock>{`
<style>
.UpdatedAt {
  display: none;
}
</style>
`}</HTMLBlock>