Skip to content

Quick start

  1. Accept the invitation. Tenon IT sends your organization’s first Administrator a link to https://admin.glow-kin.com/console/invite/…. Open it, choose a password, and set up your own two-step sign-in. The link works once, for 72 hours.

  2. Create an application and its API key. In the console:

    • go to Applications and Add an application, e.g. “Customer portal”;
    • Create an API key and copy it: it starts with tnk_ and is shown once.

    Keep it in your server’s secret settings, never in a browser or a mobile app. Each application gets its own key, and you can create a new one and revoke the old one at any time.

  3. Install the SDK for your server’s language (downloads), and create one client with the address and the key:

    TenonAuthClient tenonAuth = TenonAuthClient.builder()
    .baseUrl("https://api.glow-kin.com")
    .apiKey(System.getenv("TENON_AUTH_API_KEY"))
    .build();
  4. Let users set up a method on their settings page: authenticator codes, sign-in approval, or email codes if your Administrator allows them. Then show them recovery codes once. See Setting up a method.

  5. Add the second step to your sign-in, right after the password is checked:

    SecondStep step = tenonAuth.beginSecondStep(account.id(), new SignInContext(clientIp, userAgent));
    session.setAttribute("secondStep", step);
    // CODE_ENTRY: show the code page. PUSH_WAIT: show step.number() and wait.
    // TRUSTED or NO_METHOD: sign in (NO_METHOD: or ask them to set one up first).
    // The code page's form:
    if (tenonAuth.completeWithCode(step, code).approved()) signIn(account);

Then read Signing in for the pages to build, and When Tenon-Auth can’t be reached. Every application must fail closed.