How long a session lasts
The session doesn’t extend with activity. When it ends, the widget stops operating and asks you for a new code.
Events
The widget emits DOM events on the<ripio-crypto-widget> element. They bubble and cross the Shadow DOM boundary, so you can listen on the element itself or on any ancestor.
In a WebView there is no page of yours to listen on, so the widget also posts
{"type": "ripio-session-expired"} to your app’s native bridge — see Mobile / WebView integration.
Renewing a session
Request a new code from your server and pass it to the widget. It starts the new session and returns the user to the home screen, without reloading your page:code property again has the same effect as calling renew. In a WebView, you can also load the same page with a new #_co= fragment.
A new code can belong to a different
external_ref — for example, if a different user logs into your app on the same device. The widget starts from a clean state for every renewal.