function getCurrentUrl(settings) {
    let url;
    const authUrl = helpers.parseAuthUrl(window?.location?.href ?? null);
    if (settings.authRequested && authUrl) {
        url = new BrowserpassURL(authUrl);
    } else {
        url = new BrowserpassURL(settings.origin);
    }
    return url
}
Returns current url
@param object settings Settings object to use
@returns object Instance of BrowserpassURL