sodabase 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,9 +99,13 @@ export async function loopbackSignIn(cfg = resolveGoTrueConfig(), opts = {}) {
99
99
  res.end();
100
100
  return;
101
101
  }
102
- // Ignore any callback that isn't ours (missing/mismatched state) — don't let it resolve or reject; keep
103
- // waiting for the real redirect (or the timeout).
104
- if (u.searchParams.get("state") !== state) {
102
+ // Supabase's PKCE redirect does NOT echo our `state` back, so we can't require it — PKCE
103
+ // (code_challenge/verifier) is the real anti-injection guarantee: an injected code can't be
104
+ // exchanged without our verifier, which never leaves this process. We still reject a callback
105
+ // that echoes a DIFFERENT state (a stray hit from another in-flight flow); a missing state is
106
+ // the normal Supabase case and must be accepted, or sign-in would 404 the real redirect and hang.
107
+ const returnedState = u.searchParams.get("state");
108
+ if (returnedState !== null && returnedState !== state) {
105
109
  res.writeHead(404);
106
110
  res.end();
107
111
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sodabase",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Sodabase onboarding wizard — v2 interactive CLI (npx sodabase).",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://sodabase.io",