Skip to content

Javascript Client

Zafar Ansari edited this page Oct 10, 2022 · 1 revision

Get User

So once you have signed in and got the token you can get the user info as follows...

let token = await db.signin({
  NS: "purelygigs",
  DB: "purelygigs",
  SC: "allusers",
  email,
  password,
});
let user = await db.info();
console.log(user);
// You can also do the following, which is almost the same thing
let auth = await db.query('SELECT * FROM $auth');
console.log(auth);

Clone this wiki locally