You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{SvelteKitAuth}from"@auth/sveltekit";import{env}from'$env/dynamic/private';exportconst{ handle }=SvelteKitAuth({providers: [{id: "******",// signIn("my-provider") and will be part of the callback URLname: "******",// optional, used on the default login page as the button text.type: "oidc",// or "oauth" for OAuth 2 providersissuer: env.AUTH_ISSUER,// to infer the .well-known/openid-configuration URLclientId: env.AUTH_CLIENT_ID,// from the provider's dashboardclientSecret: env.AUTH_CLIENT_SECRET,// from the provider's dashboardauthorization: {scope: "openid profile email",},},],trustHost: env.AUTH_TRUSTED_HOST==='true',secret: env.AUTH_SECRET,basePath: '/dev/auth'});
My website is hosted behind a nginx server, and uses a proxy-pass behind the /dev/ route (so the base url is https://domainname/dev/)
In order to account for that, I juste use resolve from $app/path with relative: true in svelte.config.js
But even with basePath: '/dev/auth' instead of the default /auth, the callback URI when logging onto the authentication service is still https://domainname/auth/callback
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here's my code :
My website is hosted behind a nginx server, and uses a proxy-pass behind the /dev/ route (so the base url is https://domainname/dev/)
In order to account for that, I juste use
resolvefrom$app/pathwithrelative: truein svelte.config.jsBut even with
basePath: '/dev/auth'instead of the default/auth, the callback URI when logging onto the authentication service is still https://domainname/auth/callbackAm I missing something ?
Beta Was this translation helpful? Give feedback.
All reactions