KittyCAD / text-to-cad-ui

A lightweight UI for interfacing with the Zoo text-to-cad API, built with SvelteKit.
https://text-to-cad.zoo.dev
MIT License
55 stars 5 forks source link

sign in loop with google auth #129

Closed jgomez720 closed 3 hours ago

jgomez720 commented 3 months ago

Sign in to get started -> google auth -> select "josh@zoo.dev" -> sign in to get started

edit: also doesn't work with the email sign in

jgomez720 commented 3 months ago

We had a user email support@zoo.dev about this same sign in loop error.

I also tried this on safari, and the same thing happens.

jessfraz commented 9 hours ago

just sent frank a video about this as well, id consider this high priority

jessfraz commented 9 hours ago

its all auth not jsut google

jessfraz commented 9 hours ago

id compare how this site does auth versus teh website/modeling-app because something is fishy here, it should be saving the cookie from the response

jessfraz commented 9 hours ago

maybe somehting with svelte kit and setting a cookie from a header: https://github.com/sveltejs/kit/issues/8409

jessfraz commented 9 hours ago

for both the modeling app (app.zoo.dev) and website this works so its not like its a subdomain thing. but for reference it seems svelte is not reading the "set-cookie header" correctly where as our other sites are... idk but that should at least point you down the right direction

jessfraz commented 9 hours ago

also im concerned why this was never fixed back in march when josh could reproduce as well

jessfraz commented 9 hours ago

gets weirder

https://github.com/user-attachments/assets/1097faf4-e71e-464d-962b-5265aa6bbae1

jessfraz commented 9 hours ago

i think its because cookies are a server side check not client side, i dont know svelte https://github.com/KittyCAD/text-to-cad-ui/blob/main/src/routes/%2Bpage.server.ts#L5

im a little like maybe we should just use the same framework for all sites so this shit doesnt happen now

jessfraz commented 8 hours ago

I think we need something like this to parse it, i have no clue https://github.com/sveltejs/kit/issues/8409#issuecomment-1376275678 will leave to you

jessfraz commented 8 hours ago

i think a dumb way around this is to have a set page like /success we redirect to from login that then just redirects back to the index because it seems like svelte is a real dumb ass about the set-cookie header, but hopefully you can find something better than that