cowboycodr / kiankit

SvelteKit + Supabase starter kit
https://kit.fromkian.com
229 stars 16 forks source link

Fix/oauth redirect flow #13

Closed cowboycodr closed 6 months ago

cowboycodr commented 6 months ago

Addressing issues in #11, and #12.

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kian-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2024 5:24pm
cowboycodr commented 6 months ago

I'm getting this page when I try to log in with the google oauth flow, but not github. Makes me think that my Google OAuth Consent Screen is improperly configured, and not an issue with the logic in KianKit. image

cowboycodr commented 6 months ago

Yep. Forgot to add kit.fromkian.com, and my vercel preview/production page to authorized redirect urls in Supabase. I'm still going to test these changes I made, and if they work I'll merge.

cowboycodr commented 6 months ago

I modified the redirect logic to take the redirect URL from the searchParams on the login/signup page, store it in the form data, then take it out, and add it to the /auth/callback searchParams.

I had to do it this way because HTML strips out all non formData query params from the URL for form actions.