mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-10-03 16:22:05 +00:00
WIP
This commit is contained in:
@@ -53,6 +53,7 @@ import {
|
|||||||
} from './auth.provider.methods';
|
} from './auth.provider.methods';
|
||||||
import {requestorFactory} from './factories/requestor.factory';
|
import {requestorFactory} from './factories/requestor.factory';
|
||||||
import {storageFactory} from './factories/storage.factory';
|
import {storageFactory} from './factories/storage.factory';
|
||||||
|
import {SimpleBrowser} from '../../util/browser.factory';
|
||||||
|
|
||||||
const TOKEN_RESPONSE_KEY = 'token_response';
|
const TOKEN_RESPONSE_KEY = 'token_response';
|
||||||
const AUTH_EXPIRY_BUFFER = -5 * 60;
|
const AUTH_EXPIRY_BUFFER = -5 * 60;
|
||||||
@@ -183,6 +184,7 @@ export class AuthService {
|
|||||||
constructor(
|
constructor(
|
||||||
private readonly platform: Platform,
|
private readonly platform: Platform,
|
||||||
private readonly configProvider: ConfigProvider,
|
private readonly configProvider: ConfigProvider,
|
||||||
|
private readonly browser: SimpleBrowser,
|
||||||
) {
|
) {
|
||||||
this.storage =
|
this.storage =
|
||||||
storageFactory(platform);
|
storageFactory(platform);
|
||||||
@@ -917,17 +919,7 @@ export class AuthService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
await this.browser.open(
|
||||||
this.platform.is('capacitor')
|
|
||||||
) {
|
|
||||||
await Browser.open({
|
|
||||||
url: url.toString(),
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location.assign(
|
|
||||||
url.toString(),
|
url.toString(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user