feat(db): auth_provider_config table + AES-256-GCM encryption helpers #210
@@ -9,8 +9,9 @@ const originalFetch = window.fetch;
|
||||
* Intentionally mutates window.fetch — this is dev-only (AUTH_DISABLED=true).
|
||||
*/
|
||||
export function installDevFetchInterceptor() {
|
||||
// In production, Better-Auth handles auth via cookies — no interception needed
|
||||
if (!import.meta.env.DEV) return;
|
||||
// Only install if a dev user is selected (localStorage check, not build-time flag).
|
||||
// This ensures the interceptor runs in deployed dev builds, not just `vite dev`.
|
||||
if (!getDevUser()) return;
|
||||
|
||||
window.fetch = function (input: RequestInfo | URL, init?: RequestInit) {
|
||||
const user = getDevUser();
|
||||
|
||||
Reference in New Issue
Block a user