We have created a demo application for which uses our widget for authentication:
Using a public library called BetterSafariView for the SFSafariViewController class in Swift makes it easier to implement the authentication process with Widget. Find out more here.
You should first create a model for the Webview as such:
The link should be generated within your backend and passed to create this widget model in the form: https://widget.tryterra.co/session/<SESSION_ID>
This model will hold all the relevant information pertaining to the Widget session
As WebViewTerra conforms to an ObservableObject, you will be able to declare a WebView Object with an ObservableObject variable WebViewTerra as such: