Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.87/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