pull/715/head
Travis Fischer 2025-05-24 22:05:11 +07:00
rodzic ecd8f803bc
commit 2c82bf28a6
1 zmienionych plików z 1 dodań i 6 usunięć

Wyświetl plik

@ -27,16 +27,11 @@ export async function auth({
const port = await getPort({ port: preferredPort })
const app = new Hono()
if (port !== preferredPort) {
throw new Error(
`Port ${preferredPort} is required to sign in with ${providerLabel}, but it is already in use.`
)
}
const redirectUri = `http://localhost:${port}/callback/${provider}/success`
let _resolveAuth: any
let _rejectAuth: any
// NOTE: Promise.withResolvers requires Node.js 22+
const authP = new Promise<AuthSession>((resolve, reject) => {
_resolveAuth = resolve
_rejectAuth = reject