Open MaestroMiyagi opened 3 months ago
@MaestroMiyagi Thank you for creating this issue and also documenting the fix. I initially encountered the same error, and now also got the template running with the updated version of @auth/core
I tried a proof of concept with GitHub OAuth provider and managed to get the login & logout working as intended. However the pages of the starlight documentation don't seem to be affected by the login state as represented by the session object.
The logic in src/lib/auth.ts
doesn't seem to take effect. So even without being logged in/authenticated I can access the example doc pages that should be protected.
Did you eventually get the core functionality of protecting starlight pages to work as intended?
@TheOtterlord Is this project still maintained/functional or is it possible that with newer versions of the Astro dependencies your initial logic got broken? As it stands right now, I haven't been able to make my envisioned setup work (protect individual pages/routes in a Starlight docs site).
Thank you for building and sharing this template. I would be grateful for a quick indication whether this is still maintained/intended to work, or any other pointers you might have.
Many thanks, Arno
Describe the bug
When installing dependencies for an Astro project using
auth-astro@4.1.2
, I encountered an error due to a peer dependency conflict with@auth/core
. The project used an older version of@auth/core
(0.18.6
), whileauth-astro
required at least version0.32.0
.To Reproduce
Create a new Astro project using the Starlight Auth template:
In the prompt, select yes when asked to install the dependencies
It should give you the next error
How to fix it
Create a new Astro project using the Starlight Auth template:
In the prompt, select no when asked to install the dependencies
Upgrade @auth/core to a compatible version:
Expected behavior
Dependencies should install without errors after upgrading @auth/core.
I hope this helps anyone having this problem
Additional context
Astro version: 4.5.17
Node.js version: v22.5.1
Operating system: Ubuntu 22.04.4 LTS