Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Wrong URL fetched when logging in with oauth (google provider) #25

Open
pierrelefevre opened this issue Dec 10, 2022 · 0 comments
Open

Comments

@pierrelefevre
Copy link

Hi!
Been testing this package and seemed like everything was working until I tried the signIn button (@astro-auth/client) in react from a more complex route.

Instead of making the request to /api/auth/signin as it is supposed to, it adds it after the current route, like /my/page/api/auth/signin, which returns a 404.

My hunch is that the fetch call is missing a leading / in the signIn function at const response = await fetch("api/auth/signin".

I tested by copying over the code and importing it locally, and it works when adding the /. (const response = await fetch('/api/auth/signin' )

I'm super new to Astro so let me know if it's wrong :) Hope this helps

pierrelefevre added a commit to pierrelefevre/astro-auth that referenced this issue Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant