Skip to main content

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:
Setting the 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.
Reloading the page doesn’t renew anything. The code in the URL was already used, so a reload lands on the same “session ended” screen. The widget doesn’t reload your page on its own either.
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.