Flat scopes → Better Auth permissions. ["cart:read","cart:write"] → { cart: ["read","write"] }.
Ported from saastarter scopes.ts:150-161 — split(":") destructures only the first two segments, so a malformed
"a:b:c" yields { a: ["b"] } and a segment-less "x" is skipped (no action). Faithful to saastarter semantics.
Flat scopes → Better Auth permissions.
["cart:read","cart:write"]→{ cart: ["read","write"] }. Ported from saastarter scopes.ts:150-161 —split(":")destructures only the first two segments, so a malformed"a:b:c"yields{ a: ["b"] }and a segment-less"x"is skipped (no action). Faithful to saastarter semantics.