User Authentication

User Authentication

You can authenticate users to bring highly personalised tasks into your chatbot. Solvemate Authentication is built in a way that you can keep the existing login flow of your website or app, while guaranteeing full security on all chatbot operations.

User Authentication allows you to

That way, you can increase the level of automation on your service tasks and you can make the chatbot your main interface for your service tasks.

Technical Overview

Solvemate Authentication uses JWT (JSON Web Tokens). You generate a JWT on your platform and pass it together with a unique UserId to the Solvemate Widget via JavaScript. The credentials are then associated with the current chatbot session but they are not stored.

The secret to generate and validate the JWT is only known to you. Solvemate is not able to generate any tokens and is therefore not able to run Authenticated functions by its own.

authentication flow

Set JWT via JavaScript

You can pass the JWT along an userId (both managed by you) to the Solvemate Widget:

solvemate('userAuth', {
    'userId': '{{user.id}}',
    'token': '{{jwt}}'
});

The userAuth credentials can be provided on page load or later. It is also possible to set the token while having a conversation on the chatbot. As the credentials are not stored by Solvemate, you need to provide them whenever you want to have them available in the chatbot.

If you want to log out a user, you can simply set the userAuth to null.

solvemate('userAuth', null);