Skip to content

Instantly share code, notes, and snippets.

@balazsorban44
Last active December 15, 2022 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save balazsorban44/0439718917043365c21cbbaa60174797 to your computer and use it in GitHub Desktop.
Save balazsorban44/0439718917043365c21cbbaa60174797 to your computer and use it in GitHub Desktop.
Auth.js Example
import { AuthHandler } from "@auth/core"
// You get this from somewhere
const req = new Request("https://a.com/api/auth/session")
const res = await AuthHandler(req, {
// Make sure you trust the host header
trustHost: true,
// Eg.: `openssl rand -hex 32`
secret: "",
providers: []
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment