Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

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

Deno-powered framework for building business web apps
Go to Latest
function getUser
import { getUser } from "https://deno.land/x/netzo@0.3.91/core/plugins/auth/utils/db.ts";

Gets the user with the given authId from the database.

Examples

Example 1

import { getUser } from "../../../../core/plugins/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