Redirected to /api/auth
See original GitHub issueHello!
I’m trying to use this package for my SvelteKit app. I’m using @sveltejs/kit 1.0.0-next.132
.
I’ve copied your src/routes/api/auth/[...auth].ts
and src/routes/login.svelte
files. After clicking “Login with Google” I’m sent to through Googles flow but finally I just end up at /api/auth
with a “Not found” message. If I go to /profile
nothing is saved in the session
.
Any suggestions on how to make this work? Cheers
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ASP.Net Core - no redirect on API auth error - Stack Overflow
When authorization for accessing the action FetchAll() Fails I want HttpStatusCode.Forbidden as response. Instead Mvc does a reroute to Account/Login?ReturnUrl ...
Read more >OAuth SCP login redirecting to Client page - osTicket Forum
My App registration in Azure has a redirect URI of https://helpdesk.domain/api/auth/oauth2. My Oauth instance matches the Azure settings as ...
Read more >Authenticating and authorizing through a redirect URL - IBM
If you use methods for authentication that are not supported by API Connect, you can redirect users to a suitable URL at which...
Read more >Microsoft OAuth2 - Redirect URI (reply URL) problem
Does it require that osTicket service need to be public as "Callback Endpoint" "http://helpdesk.mydomain.com/api/auth/oauth2" can be ...
Read more >After being redirected from AUTH0_DOMAIN/authorize to ...
After being redirected from AUTH0_DOMAIN/authorize to callback I get token but ... https://auth0.com/docs/api-auth/grant/authorization-code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, after reading the source code for 1 hour, I found the solution. You have to set the
redirect
property in the query params. So, for example:I am having this issue too, but I already set the redirect to
/
. I’m trying a very janky workaround by setting the redirect callback to the following:Furthermore, this problem only happens when I deploy to heroku. Even building locally and running doesn’t have this issue. I’m going to try the workaround and tell if it works.
Update: It works. I have no clue why, but at least it works.