-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: allow custom base path #169
base: main
Are you sure you want to change the base?
Conversation
* add basePath to module config w/ default /api/auth * generate auth.config.mjs module file * add #auth-config alias
replace hardcoded basePath with config variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for contributing.
This is looking great!
Looks like the tests are failing so this will need a bit more work.
Could you try to remove the ts-expect errors and add a declaration file to handle the config?
I'm seeing the same build error when run against the main branch. |
Really looking for the feature also is blocking our current work any update @Hebilicious |
π Linked issue
Allow custom base path other than /api/auth #168
β Type of change
π Description
By allowing the user to configure a
basePath
, the user can implement their NuxtAuthHandler on any route they chose.This PR adds an optional
basePath
to the module configuration object (with default/api/auth
for backwards compatibility). It generates a#build/auth.config.mjs
with#auth-config
alias. And uses the configuration variable where needed.Docs are also updated to include the new basePath configuration.
resolves #168
π Checklist