Last active
December 15, 2022 16:12
-
-
Save balazsorban44/0439718917043365c21cbbaa60174797 to your computer and use it in GitHub Desktop.
Auth.js Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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