diff --git a/frontend/app/src/app/modules/auth/auth.service.ts b/frontend/app/src/app/modules/auth/auth.service.ts index 1544ce6d..ab5c4432 100644 --- a/frontend/app/src/app/modules/auth/auth.service.ts +++ b/frontend/app/src/app/modules/auth/auth.service.ts @@ -53,6 +53,7 @@ import { } from './auth.provider.methods'; import {requestorFactory} from './factories/requestor.factory'; import {storageFactory} from './factories/storage.factory'; +import {SimpleBrowser} from '../../util/browser.factory'; const TOKEN_RESPONSE_KEY = 'token_response'; const AUTH_EXPIRY_BUFFER = -5 * 60; @@ -183,6 +184,7 @@ export class AuthService { constructor( private readonly platform: Platform, private readonly configProvider: ConfigProvider, + private readonly browser: SimpleBrowser, ) { this.storage = storageFactory(platform); @@ -917,17 +919,7 @@ export class AuthService { ); } - if ( - this.platform.is('capacitor') - ) { - await Browser.open({ - url: url.toString(), - }); - - return; - } - - window.location.assign( + await this.browser.open( url.toString(), ); }