diff --git a/crates/gpapi/src/process/browser_authenticator.rs b/crates/gpapi/src/process/browser_authenticator.rs index e57270fb..7657ca34 100644 --- a/crates/gpapi/src/process/browser_authenticator.rs +++ b/crates/gpapi/src/process/browser_authenticator.rs @@ -17,9 +17,14 @@ impl BrowserAuthenticator<'_> { } pub fn new_with_browser<'a>(auth_request: &'a str, browser: &'a str) -> BrowserAuthenticator<'a> { + let browser = browser.trim(); BrowserAuthenticator { auth_request, - browser: if browser == "default" { None } else { Some(browser) }, + browser: if browser.is_empty() || browser == "default" { + None + } else { + Some(browser) + }, } }