Auto-login

Auto-login allows your authenticated users to submit feedback without creating separate Convas accounts. The feature automatically identifies users based on your existing authentication system and enables advanced user segmentation.

Prerequisites

Before setting up auto-login, make sure you have:

  1. Custom domain configured - Required for auto-login to work
  2. Widget installed - Auto-login works together with the feedback widget

How Auto-login Works

When you enable auto-login, your users will be automatically authenticated on Convas and linked to their existing account in your application. They can submit feedback without logging in or creating separate accounts. 🚀

This feature is in Early Preview, which means it's ready to use but may still have some rough edges.

Installation

To set up auto-login, copy and paste the code snippet below before the </body> tag on every page where you want to identify users.

Important: Replace feedback.example.com with your actual custom domain configured in Convas settings.

<script>
  // Load the Convas SDK
  (function (w, d, s, o, f, js, fjs) {
    w[o] = w[o] || function () {
      (w[o].q = w[o].q || []).push(arguments);
    };
    (js = d.createElement(s)), (fjs = d.getElementsByTagName(s)[0]);
    js.id = o;
    js.src = f;
    js.async = 1;
    fjs.parentNode.insertBefore(js, fjs);
  })(
    window,
    document,
    "script",
    "_convas_sdk",
    "https://convas.io/static/convas-sdk.js"
  );

  // Initialize Convas with your custom domain
  window._convas_sdk("init", {
    debug: false, // Set to true for development
    customDomain: "feedback.example.com", // Replace with your domain
    widget: {
      enabled: true,
      showLauncher: true,
    },
  });

  // Identify the current user
  window._convas_sdk("identify", {
    enabled: true,
    user: {
      id: "user-id", // Your user's unique ID
      name: "John Doe", // User's display name
      email: "john.doe@example.com", // User's email
      customFields: { role: "Project Manager" }, // Optional: additional user data
      createdAt: new Date(), // Optional: when user was created
    },
    // Optional: Company information for B2B segmentation
    company: {
      id: "company-id", // Your company's unique ID
      name: "Example Company", // Company name
      customFields: { employees: 100 }, // Optional: additional company data
      createdAt: new Date(), // Optional: when company was created
      monthlySpend: 600, // Optional: revenue/usage data
    },
  });
</script>

Rate Limiting

Convas throttles auto-login requests to 3 calls per minute to prevent abuse and ensure optimal performance.

Limitations

Please be aware of these current limitations:

  • Company Users: It's not possible to authenticate Company Users with the SDK
  • Limited Actions: Auto-authenticated users can only create new posts and comments. They cannot edit their profile or delete content without manual authentication
  • Custom Domain Required: Auto-login only works with a properly configured custom domain

Related Documentation