The widget does not open
Check these conditions in order:- The code is running in a browser with
windowanddocumentavailable. new Connect(...)completed without throwing.setup()orreauthorise(accountId)ran beforeopen().open()runs from a user action such as a button click.- Browser policy, an extension, or a Content Security Policy is not blocking
https://connect.mono.co.
Constructor errors
The current SDK throws synchronously when either required constructor value is missing.Reauthorization errors
reauthorise() requires a Mono account ID string.
Do not pass the initial auth code or a value labeled
reauthToken.
onSuccess runs, but no account is stored
The browser callback returns a short-lived code. Your backend must still exchange it.
Check that:
- the browser sends
{ code }to an authenticated backend route MONO_SECRET_KEYexists only in the server environment and is sent throughmono-sec-key- the backend parses the exchange response using Mono’s current schema
- non-2xx responses are logged without exposing secrets
- the resulting account ID is stored against the correct application user
Events appear more than once
Create one Connect instance per mounted page or component. Recreating the instance on every render can mount multiple widgets or register repeated listeners. In React, create the instance insideuseEffect and keep it in useRef. In Angular, initialize it in ngOnInit. In Next.js, keep initialization inside a Client Component.
The wrong institution or account flow opens
Review the object passed tosetup():
selectedInstitution to return to the institution-selection screen. Confirm institution IDs and supported authentication methods against current coverage data.