Get Started

We engineered Kno to give you the best in class authentication. It is simple to get started with in less than 10 minutes.

Integration

To start authenticating with Kno requires a client side and server side integration.

The quickest way to get started on the client is to use Kno Now. Which can be as simple as a single line of code.

Kno Now is regularly updated with new features, so your users can always take advantage of the latest technology.

Site credentials

  • site-token: Identifies your site with Kno, it is not secret and can be safely used in the front end.
  • api-token: Used to issue API requests to Kno, This must be stored securely and used only on the server.

The following tokens will work for test sites, served from localhost.

  • site-token: site_UITYJw8kQJilzVnux5VOPw
  • api-token: API_AAAAAgDOxdmUqKpE9rw82Jj0Y6DM

Kno Now

Kno Now is a sign up/login form that works within your site. Users are authenticated swiftly, without being directed away from your site.

Authentication done right

Kno Now securely authenticates a user using the Kno server. A one time token representing that user is generated. Your backend can upgrade this token for a view of that user personalised to your service.

Kno Now offers two client integrations.

  • HTML - For server rendered applications.
  • JavaScript - For Single Page Apps (SPAs).

Add the following snippet to any page where your users should be able to authenticate.

<form action="/sign-in" method="POST">
<script
  src="https://trykno.app/pass.js"
  data-site="[site-token]">
</script>
<button type="submit">Sign in</button>
</form>
  • The form action should direct to your own server side code that will handle authentication.
  • You must replace [site-token] with a site-token for your site. Get one by signing in now
This snippet should only be added to a page when visited by an unauthenticated user.

Clicking the submit button will start the Kno authentication process. Once completed a token will be added to the knoToken field and the form submitted.

The JavaScript integration is currently pre-release. To get early access to the documentation, please get in touch team@trykno.com

Authenticate a client

A knoToken is used to authenticate a client with your application. To ensure the security of you application, the server must exchange the knoToken for the clients persona information.

First, extract the knoToken from the form data received by the server. Then call the Kno API to complete the authentication process. API calls are authenticated with your private API token.

curl "https://api.trykno.app/v0/authenticate" \
-u [api-token]: \
-d token=[kno-token]
Coming soon. To get early access to the documentation, please get in touch team@trykno.com
Coming soon. To get early access to the documentation, please get in touch team@trykno.com
Coming soon. To get early access to the documentation, please get in touch team@trykno.com
  • Replace api-token with your own token.
  • Replace kno-token with the token submitted by the client.

Persona data

{
"persona": {
  "id": "[persona-id]"
}
}

A persona is the identity of an end user presented to your user. Your service can always see the following data about a persona:

  • id: The identity of a persona is unique to your site.
A persona is considered to be an Active Persona if they were last active within the past 28 days.

Extra information

The user's verified email address and other optional data can also be returned. Edit the site setting to receive these values.

Next steps

Once you have a users details the most likely action is to create a session for them

Sites

A site/host is a domain that can be used to access your service. A site is identifies by a siteToken which can be used only on that site.

If the same user identites should be used across multiple sites they must all be added to the same space/service.

A space is context for which an **End User** presents the same identity.

Tokens

Tokens grant the holder of them certain privilages.

API reference

This page describes the trykno API.

URL

The API is hosted at api.trykno.app and must be accessed over HTTPS.

All requests must specify an API version, which is prepended to the path. The current version is v0.

https://api.trykno.app/v0

Client Errors

Any client error will receive a response with a 4XX status code. Error responses have the following structure

{
"error": {
  "id": "tracing_id",
  "status": 400,
  "code": "code",
  "title": "title",
  "detail": "detail",
  "meta": "meta"
}
}
  • id A unique identifier for this particular occurrence of the problem. This will be the tracing_id if one was sent with the request.
  • status. The HTTP status code applicable to this problem, expressed as a string value.

Authentication

All requests to the API are authenticated with an api_token.

Request id's

Requests can set a x-request-id header value.