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

[🐞] @auth/qwik package does not correctly register routes #6729

Closed
cwoolum opened this issue Jul 27, 2024 · 2 comments · Fixed by #6730
Closed

[🐞] @auth/qwik package does not correctly register routes #6729

cwoolum opened this issue Jul 27, 2024 · 2 comments · Fixed by #6730
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@cwoolum
Copy link
Contributor

cwoolum commented Jul 27, 2024

Which component is affected?

Qwik Runtime

Describe the bug

When trying to use the @auth/qwik package, routes are not getting registered which causes auth redirects to fail with the error /api/auth/signin not found.

image

Reproduction

https://stackblitz.com/edit/qwik-starter-7tnnx2

Steps to reproduce

  1. Create a new Qwik app
  2. Add auth
  3. Convert to using @auth/core instead of @builder.io/qwik-auth in [email protected].
  4. Add an onRequest handler to redirect if a user is unauthenticated

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @auth/core: ^0.13.0 => 0.13.0 
    @auth/qwik: ^0.2.2 => 0.2.2 
    @builder.io/qwik: ^1.4.3 => 1.4.3 
    @builder.io/qwik-auth: 0.1.1 => 0.1.1 
    @builder.io/qwik-city: ^1.4.3 => 1.4.3 
    typescript: 5.3.3 => 5.3.3 
    undici: 5.28.2 => 5.28.2 
    vite: 4.5.2 => 4.5.2

Additional Information

No response

@cwoolum cwoolum added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Jul 27, 2024
@cwoolum cwoolum changed the title [🐞] @auth/qwik packages do not correctly register routes [🐞] @auth/qwik package does not correctly register routes Jul 27, 2024
@cwoolum
Copy link
Contributor Author

cwoolum commented Jul 27, 2024

Dug a bit deeper and as per the source, the auth routes no longer live under /api. I'll get a PR up to fix the docs.

@gioboa
Copy link
Member

gioboa commented Jul 27, 2024

Thanks @cwoolum nice catch
The basePath is /auth here is the code
I'm looking forward to merging your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants