{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Terms of Service (TOS) Flow","description":"Tilia Wallet Developer Documentation","siteUrl":"https://thunes-tilia-docs.redocly.app/","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"terms-of-service-tos-flow","__idx":0},"children":["Terms of Service (TOS) Flow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This flow allows a user to review and accept the latest version of the Tilia Terms of Service. In addition to being a prerequisite for other flows, it is also available as a standalone flow. If the user has already accepted the latest TOS, the flow will complete without displaying the UI. If the TOS has changed since the user last visited, they will be presented with a UI so they can review and accept the updated version."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/widget-tos-new.1409b156026da4237f39d68c53df326ab2a575217de152502ff34b65ac387200.9c1bb791.png","alt":"tos flow redirect"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"widget-flow","__idx":1},"children":["Widget flow"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"window.Tilia.execute({\n    rootId: < your.element.id > ,\n    flow: tos,\n    redirect: < redirect > ,\n    onComplete: handleComplete,\n\tonError: handleError,\n});\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["handleComplete"]}," callback is invoked by the widget with the result of the flow."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the user cancels anywhere in the flow:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"{\n\tsource: “tilia”,\n\tevent: “tilia.tos.complete”,\n\tstate: “cancel”,\n}\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the user completes the flow:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"{\n\tsource: “tilia”,\n\tevent: “tilia.tos.complete”,\n\tstate: “complete”,\n}\n","lang":"javascript"},"children":[]}]},"headings":[{"value":"Terms of Service (TOS) Flow","id":"terms-of-service-tos-flow","depth":1},{"value":"Widget flow","id":"widget-flow","depth":3}],"frontmatter":{"seo":{"title":"Terms of Service (TOS) Flow"}},"lastModified":"2024-07-24T17:23:10.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/web-uis/tos-flow","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}