You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Align with team policy: provide nothing → full sandbox; provide config → provide everything.
Zero config (createAuthConfig with no args):
- Always use sandbox client ID (deriveDefaultClientId returns DEFAULT_SANDBOX_CLIENT_ID)
- No environment detection; avoids conflicts when nothing is configured
Full config (createAuthConfig with config):
- Require clientId and redirectUri when config is provided
- Throw if either is missing to prevent partial config conflicts
- No merging with derived defaults when config is passed
Bug fixes (Cursor Bugbot):
- createDefaultLogoutConfig: forward authenticationDomain to avoid logout failures in custom envs
- wallets-connect-with-nextjs callback: use deriveDefaultClientId() for consistency with login flow
For development and quick prototyping, you can use `createAuthConfig()` with no configuration. It auto-detects:
85
-
-`clientId` based on environment (sandbox for localhost/sandbox hostnames or when `NODE_ENV=development`, production otherwise)
86
-
-`redirectUri` from `window.location.origin + '/callback'`
84
+
Policy: **provide nothing → full sandbox; provide config → provide everything.**
87
85
88
-
> **Server-side detection:** On the server, `window` is unavailable, so sandbox is inferred from `NODE_ENV === 'development'`. This keeps client and server in sync when running locally with `next dev`. For production deployments, pass `clientId` explicitly.
86
+
With no configuration, `createAuthConfig()` uses sandbox defaults:
87
+
-`clientId`: sandbox (public Immutable client ID)
88
+
-`redirectUri`: from `window.location.origin + '/callback'` (path only on server)
89
+
90
+
When providing config, pass `clientId` and `redirectUri` (and optionally `audience`, `scope`, `authenticationDomain`) to avoid conflicts.
0 commit comments