convex
Version:
Client for the Convex Cloud
23 lines (20 loc) • 547 B
text/typescript
import { Auth } from "../authentication.js";
import { performSyscall } from "./syscall.js";
export function setupAuth(): Auth {
return {
getUserIdentity: () => {
const syscallJSON = performSyscall("getUserIdentity", {});
return Promise.resolve(syscallJSON);
},
};
}
export function setupActionAuth(requestId: string): Auth {
return {
getUserIdentity: () => {
const syscallJSON = performSyscall("actions/getUserIdentity", {
requestId,
});
return Promise.resolve(syscallJSON);
},
};
}