X-Client-Package determines this

This commit is contained in:
Manav Rathi
2024-12-17 09:33:40 +05:30
parent 8ffb52dd7e
commit 9b292bbd80

View File

@@ -71,11 +71,10 @@ export interface RecoveryKey {
export const sendOTT = async (email: string, purpose: "change" | undefined) =>
ensureOk(
await fetch(await apiURL("/users/ott"), {
headers: publicRequestHeaders(),
method: "POST",
headers: publicRequestHeaders(),
body: JSON.stringify({
email,
client: appName == "auth" ? "totp" : "web",
purpose: purpose ?? "",
}),
}),
@@ -191,14 +190,6 @@ export const changeEmail = async (email: string, ott: string) => {
);
};
export const sendOTTForEmailChange = async (email: string) => {
await HTTPService.post(await apiURL("/users/ott"), {
email,
client: "web",
purpose: "change",
});
};
export const setupTwoFactor = async () => {
const resp = await HTTPService.post(
await apiURL("/users/two-factor/setup"),