Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getSession() does not listen to the SessionProvider baseUrl #146

Open
rcannood opened this issue Dec 10, 2024 · 0 comments
Open

getSession() does not listen to the SessionProvider baseUrl #146

rcannood opened this issue Dec 10, 2024 · 0 comments

Comments

@rcannood
Copy link

rcannood commented Dec 10, 2024

Hi @OrJDev ! Thanks for creating a solidstart authjs package!

I'm running into an issue, where passing a baseUrl to the SessionProvider doesn't seem to affect a part of the code.


In my app.tsx, I'm passing a baseUrl to the SessionProvider:

              <SessionProvider baseUrl={getServerBaseUrl()}>
                <Layout>{props.children}</Layout>
              </SessionProvider>

However, when trying to authenticate on Deno Deploy, I get:

@auth TypeError: error sending request for url (http://localhost:3000/api/auth/session): client error (Connect): tcp connect error: Cannot assign requested address (os error 99): Cannot assign requested address (os error 99)
    at async mainFetch (ext:deno_fetch/26_fetch.js:177:12)
    at async fetch (ext:deno_fetch/26_fetch.js:423:7)
    at async A$b (file:///src/server/index.ts:34473:13)
    at async n (file:///src/server/index.ts:34454:17)
    at async s (file:///src/server/index.ts:34459:23)
    at async file:///src/server/index.ts:34461:77

I have a feeling that this is because the following code does not listen to the sessionprovider's baseUrl:

const res = await fetch(getUrl(`${getBasePath()}/session`), reqInit)

Because getUrl only looks at AUTH_URL_INTERNAL, AUTH_URL, VERCEL_URL, all of which are undefined in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant