Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

Xano (Authentication System)

Xano can be used as an Authentication System in WeWeb when you want to sign users in with your own Xano endpoints and keep the session inside WeWeb.

What this system supports

  • Sign in and sign up flows powered by your own Xano endpoints
  • Session storage in WeWeb using the token returned by Xano
  • Loading the current user on refresh with On user load
  • Workflow templates for Sign In, Sign Up, Log Out, and Fetch Current User

Set up Xano

1) Prepare your Xano project

Before connecting Xano in WeWeb, make sure your Xano project already has the endpoints you want to use for authentication.

Most projects will need:

  • A sign-in endpoint such as /auth/login
  • A sign-up endpoint such as /auth/signup
  • A current-user endpoint such as /auth/me

Your sign-in and sign-up endpoints should return a token that WeWeb can store in the session. The built-in Xano templates are already set up to read either authToken or accessToken. If you also return refreshToken or metadata, you can store those too.

You will also need a Xano Meta API Key so WeWeb can list your instances, workspaces, and API groups when you set up the connection.

2) Connect Xano in WeWeb

  1. Go to Data & API → Authentication.
    • A) If this is your first time opening the Authentication area, choose Xano when prompted.
    • B) If this is not your first time, open Configuration, click Switch authentication system, then select Xano.
  2. Create or select a Xano connection for the current environment.
  3. Fill in the connection fields:
    • Meta API Key
    • Instance
    • Workspace
  4. Optional fields you can also set:
    • Custom Domain
    • X-Data-Source
    • X-Branch
    • Connection Hash For Xano Realtime
    • Global Headers

If you use different Xano setups for the editor and production, save the values for each environment inside the same connection.

Build the auth flows

Once Xano is your current Authentication System, WeWeb shows Xano auth workflow templates that you can start from.

Sign in template

On a sign-in form, use the Xano template Sign In.

This template:

  1. Calls your Xano sign-in endpoint
  2. Stores the returned session with Authenticate Xano
  3. Navigates to the page you choose

By default, the template points to POST /auth/login, but you can change the endpoint path and API group if your Xano project uses a different route.

Sign up template

On a sign-up form, use the Xano template Sign Up.

This template:

  1. Calls your Xano sign-up endpoint
  2. Stores the returned session with Authenticate Xano
  3. Navigates to the page you choose

By default, the template points to POST /auth/signup, but you can change it if needed.

Log out template

On a button or similar element, use the Xano template Log Out.

This template clears the current Xano session in WeWeb, then navigates to the page you choose.

Fetch Current User template

For app-level auth loading, use the Xano template Fetch Current User on the trigger On user load.

This template:

  1. Calls your Xano current-user endpoint
  2. Sends Authorization: Bearer <accessToken> using the session token already stored in WeWeb
  3. Finishes with Set user

By default, the template points to GET /auth/me, but you can change the path if your project uses a different endpoint.

Xano auth actions in workflows

When Xano is the current Authentication System, WeWeb gives you Xano auth actions such as:

  • Authenticate
  • Set User
  • Clear Session

Authenticate

Use Authenticate after your Xano sign-in or sign-up request succeeds.

It can store:

  • Auth Token
  • Refresh Token
  • Metadata
  • Persist Session

The Xano templates already map authToken and accessToken for you, but you can update the mapping if your response uses different key names.

Set User

Use Set User after you fetch the current user from Xano.

This is what makes the authenticated user available in WeWeb for page protection, access checks, and display in the interface.

Clear Session

Use Clear Session when you want to log the user out inside WeWeb.

Test sign in

  1. Build a simple sign-in form in the Interface.
  2. Create a workflow on the form and use the Xano → Sign In workflow template .
  3. Configure the Xano request to use the correct API group and endpoint.
  4. Map the body fields your Xano endpoint expects, such as email and password.
  5. Preview the app and sign in with a test user.
  6. Confirm that:
    • The session is stored
    • The user is redirected correctly

For page and API protection, see Users and roles →.

Common pitfalls

The user signs in, but looks signed out after refresh

This usually means On user load is not set up yet, or the workflow does not finish with Set user.

The sign-in request succeeds, but WeWeb does not store the session

Check the token mapping in Authenticate. The default template expects authToken or accessToken.

If your Xano response uses a different key name, update the binding in the action.

Reference

Connection fields

FieldDescription
Meta API KeyKey used by WeWeb to list your Xano instances, workspaces, and API groups
InstanceThe Xano instance you want to connect
WorkspaceThe Xano workspace you want to use
Custom DomainOptional custom domain for your Xano project
X-Data-SourceOptional header for Xano data source selection
X-BranchOptional header for Xano branch selection
Connection HashOptional realtime connection hash for Xano Realtime
Global HeadersOptional headers sent on all Xano requests

CONTINUE LEARNING

Next, build the actual Xano sign-in flow with the ready-made templates and show the signed-in user's data in your app.

Sign users in and get their info with Xano →