Skip to main content

Authentication

Once the SDK is configured you can authenticate the user. Authentication downloads the user data, registers the push token and connects the chat socket.

Authenticate​

import { MeetingLawyers } from './plugins/meeting-lawyers';

await MeetingLawyers.authenticate({ userId: 'USER_ID' });

userId is the user identifier provided by your backend integration — see the Public API - User documentation.

The promise rejects with a descriptive message if the API key or the user id are not valid.

note

configure() must have been called before authenticate().

Check the session​

const { authenticated } = await MeetingLawyers.isAuthenticated();

Logout​

await MeetingLawyers.logout();

Next steps​