when a user signs in in the live app i can fetch the api from supabase (rls is enabled) and i get the data. but in the editor on the api request i get no data i've downloaded the toddle extension and the log in form on success saves the access token to the session cookie.
Tom Ireland
1 year ago
Are you signing into the app in preview on the same branch you’re working on in the editor?
wrong flag . i dont know what i did but it is not working now. i'm getting this error {"code":401,"error_code":"no_authorization","msg":"This endpoint requires a Bearer token"}
but if i hard code the access token as a header it works.
Tom Ireland
1 year ago
Odd. You shouldn’t need the extra authorization header in your user GET call. You mentioned you are setting the session cookies on the login request but it sounds like that’s what might be missing. You’re definitely logging in via preview (not test) on the same branch and not in the editor?