Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Auibuttongroup
TTS
idk6bthk4se7899n8160gkwq
title
alignmentleft
directionhorizontal
Auibutton
colorPalettesDefault
color#F4F5F6
textColorPaletteDefault
idx1vh8iotn4q12gcx2fmw
titleServer
typestandard
textColor#091E42
titlebackgroundColorPaletteServerDefault
urlhttps://appfireconfluence.atlassianspartez-software.netcom/wikidisplay/spaces/TTS/pages/43778134/Quickstart+Guide
targetfalse
Auibutton
color#3C86BE
idpmov72g3jdnCFSD/Chat+for+Service+Management
Auibutton
colorPalettesDefault
color#3E6FB5
textColorPaletteDefault
idsrk07kf44o
titleCloud
typestandard
titletextColorCloud#FFFFFF
backgroundColorPaletteDefault
urlhttps://appfire.atlassian.net/wiki/spaces/TTSCCHAT/pages/35456108/Quickstart+Guide94208903/Enabling+Auto-Login+Integration
Panel
panelIconId2139
panelIcon:information_source:
panelIconTextℹ️
bgColor#F4F5F7

This page is about Chat for JSM Cloud. Using Server? Click the Server button above.

...

Panel
panelIconId0b4dfdca-ccd8-4047-a32e-42a4d1e5921b
panelIcon:chatjsm:
panelIconText:chatjsm:
bgColor#DEEBFF

The auto-login feature requires several changes on the front end and back end of the service that is going to be integrated.

Prerequisites

A pre-shared secret key is used to verify that the login request is valid and coming from your (client’s) backend. Each service desk project has its own secret key. To obtain the key, open your project, and go to Project Settings > Chat Settings > Widget Functionality > Registration & Log In.

Here, enable the Auto-Login feature and click the (blue star) icon to generate a new secret key:

...

The pre-shared secret key should be stored in on the backend.

Logging in

While performing user login on the website, the service should generate and issue a JWT access token for a chat and sign it with the pre-shared secret, as shown in the example below:

...

Code Block
languagehtml
try {
  await spartezSupportChat.sso.login(token);
} catch (exception){
  //handle exception
}

In order to make it work, we need to make sure that Chat has been correctly initialized before the login operation. To do this, we can use initCallback from the spartezSupportChat object – see Install Add Chat Widget on to Your Website.

During the login operation, an error may occur. In that case, an exception will be thrown. To get the error description, you can access exception.message property.

After that, the user will be logged in with the credentials described in the token, and all tickets will have the reporter field assigned to the SSO user, keeping the original user in the request requested participants.

Limitation 1: If the login failed in the case that the customer has an account already in atlassian.com, please check if they have set the visibility of their contact email to "Anyone" so that the Chat app can see the email address and match the two.

...

(Here's the link to the profile setting: Profile and Visibility)

Limitation 2: Due to the Jira user creation process, while logging in with a non-existing JSM user email, it may take some time for the user to be fully created on the Atlassian side (less than 1 minute). During this process, trying to log in again with the newly created user may lead to an error, which is temporary.

Logging out

To log out, the service’s frontend should call await spartezSupportChat.sso.logout();.