Skip to content

Instantly share code, notes, and snippets.

View labkey-nicka's full-sized avatar

Nick Kerr labkey-nicka

View GitHub Profile
@labkey-nicka
labkey-nicka / login.js
Created May 6, 2021 20:02
Login Example
import { ActionURL, Ajax, Utils } from '@labkey/api';
export const newLogin = (setErrorMsg) => {
Ajax.request({
// Use ActionURL.buildURL() to compose LK URLs.
// See: https://labkey.github.io/labkey-api-js/modules/actionurl.html#buildurl
url: ActionURL.buildURL('login', 'loginAPI.api'),
method: 'POST',
params: {
email: document.getElementById('email-sign-in').value,