Please login to access all of the features of the Community Site.

OpenBrowser

M v1.0

This command allows you to open a web address using the built-in browser inside the application.

If you are opening a URL to your own Rock server and wish to ensure the user is logged in, you can pass an empty rckipid parameter and an impersonation token will be automatically generated.

Note that tokens generated with an empty parameter will use the settings defined in Rock's global attributes, which may be more open than your specific implementation needs. Consider your impersonation strategy and understand the risk that individuals can share their impersonated URL without realizing it. Alternatively, you can use the Lava filter PersonImpersonationToken.

The built-in browser does not store Rock authentication tokens long-term, so passing an empty rckipid parameter is how individuals are signed in automatically. However, Rock will not create or accept a personal token for anyone whose Account Protection Profile is listed under "Disable Usage of Personal Tokens for the Following Protection Profiles" in Security Settings (by default, the Extreme profile). Those individuals will need to sign in manually each time the browser opens, even if they check "Stay signed in." Everyone else is signed in through the token as expected.

The CommandParameter can either be a string, which contains the URL and query string parameters, or it can be a reference to an OpenBrowserParameters object which contains the following properties.

Properties

PropertyTypeDescription
UrlstringThe URL to be opened. May contain query string parameters.
Parameters  List<Parameter>  Any additional query string parameters to be included with the URL.
<Button Text="Open Internal"
    Command="{Binding OpenBrowser}"
    CommandParameter="https://www.rockrms.com/" />
<Button Text="Open Internal"
    Command="{Binding OpenBrowser}">
    <Button.CommandParameter>
        <Rock:OpenBrowserParameters Url="https://www.rockrms.com/">
            <Rock:Parameter Name="q"
                Value="rockrms" />
        </Rock:OpenBrowserParameters>
    </Button.CommandParameter>
</Button>