mirror of
https://github.com/docmost/docmost.git
synced 2026-05-08 23:33:09 +08:00
dcbb65d799
* LDAP - WIP * WIP * add hasGeneratedPassword * fix jotai atom * - don't require password confirmation for MFA is user has auto generated password (LDAP) - cleanups * fix * reorder * update migration * update default * fix type error
24 lines
527 B
TypeScript
24 lines
527 B
TypeScript
import api from "@/lib/api-client.ts";
|
|
import { ILoginResponse } from "@/features/auth/types/auth.types.ts";
|
|
|
|
interface ILdapLogin {
|
|
username: string;
|
|
password: string;
|
|
providerId: string;
|
|
workspaceId: string;
|
|
}
|
|
|
|
export async function ldapLogin(data: ILdapLogin): Promise<ILoginResponse> {
|
|
const requestData = {
|
|
username: data.username,
|
|
password: data.password,
|
|
};
|
|
|
|
const response = await api.post<ILoginResponse>(
|
|
`/sso/ldap/${data.providerId}/login`,
|
|
requestData
|
|
);
|
|
|
|
return response.data;
|
|
}
|