Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/plugins/auth/utils/db.ts>getUser

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function getUser
import { getUser } from "https://deno.land/x/netzo@0.4.49/plugins/auth/utils/db.ts";

Gets the user with the given authId from the database.

Examples

Example 1

import { getUser } from "../../../../auth/utils/db.ts";

const user = await getUser("jack");
user?.authId; // Returns "auth0|xxx"
user?.sessionId; // Returns "xxx"
user?.roles; // Returns ["admin"]
user?.provider; // Returns "github"

Parameters

authId: string