Closed peterhirn closed 1 month ago
can you try adding:
VITE_AUTH_PATH=/api/auth
AUTH_URL=http://localhost:3000
to your .env and see if it works?
Unfortunately throws the same error
[auth][error] UnknownAction: Cannot parse action at /session. Read more at https://errors.authjs.dev#unknownaction
at parseActionAndProviderId (file:///project/node_modules/.pnpm/@auth+core@0.35.0/node_modules/@auth/core/lib/utils/web.js:93:15)
at toInternalRequest (file:///project/node_modules/.pnpm/@auth+core@0.35.0/node_modules/@auth/core/lib/utils/web.js:24:40)
at Module.Auth (file:///project/node_modules/.pnpm/@auth+core@0.35.0/node_modules/@auth/core/index.js:67:35)
at Module.getSession (/project/node_modules/.pnpm/@solid-mediakit+auth@2.1.2_@auth+core@0.35.0_@solidjs+meta@0.29.4_solid-js@1.8.22__@solidjs+r_f44f3uukfshh32i6kk7u4dpwiq/node_modules/@solid-mediakit/auth/index.js:211:48)
Well our team really didn't touch the auth package in a while (since we developed and published some more packages), therefore, it is possible that the AuthJS team changed their api, i will have to get this package bumped to the latest version, i will do it either today or tomorrow
Nice, thank you. This is not urgent, the workaround is good, log spam not a problem. Since auth/core is still v0.x it is basically pinned here and users have to actively force a newer version.
looking at their source code, you basically shouldn't have both basePath
and AUTH_URL
configured, this is such a useless warning and im not sure why they did it but at least we know now that its just a warning and everything should still work as expected
try {
const url = envObject.AUTH_URL
if (url) {
if (config.basePath) {
if (!suppressBasePathWarning) {
const logger = setLogger(config)
logger.warn("env-url-basepath-redundant")
}
} else {
config.basePath = new URL(url).pathname
}
}
} catch {
// Catching and swallowing potential URL parsing errors, we'll fall
// back to `/auth` below.
} finally {
config.basePath ??= `/auth`
}
Agreed. I think it would be reasonable to set suppressBasePathWarning
here:
https://github.com/solidjs-community/mediakit/blob/main/packages/auth/solid/src/utils.ts#L74
Agreed. I think it would be reasonable to set
suppressBasePathWarning
here:https://github.com/solidjs-community/mediakit/blob/main/packages/auth/solid/src/utils.ts#L74
Yep i saw it i just wasn't sure if i want to disable the warnings, but tbf im not sure why it even warns based on this condition so i will probably disable it for now
I'm not sure if this is a issue here or in
@auth/core
.Using the just released v0.35.0 fails with
Workaround
Additional log spam (
basePath
not configured in mySolidAuthConfig
)