mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
Add helper methods to EnvironmentService for retrieving urls (#435)
This commit is contained in:
@@ -279,10 +279,7 @@ export class LoginCommand {
|
||||
}
|
||||
});
|
||||
let foundPort = false;
|
||||
let webUrl = this.environmentService.getWebVaultUrl();
|
||||
if (webUrl == null) {
|
||||
webUrl = 'https://vault.bitwarden.com';
|
||||
}
|
||||
const webUrl = this.environmentService.getWebVaultUrl();
|
||||
for (let port = 8065; port <= 8070; port++) {
|
||||
try {
|
||||
this.ssoRedirectUri = 'http://localhost:' + port;
|
||||
|
||||
@@ -4,6 +4,7 @@ import * as fe from 'node-fetch';
|
||||
|
||||
import { ApiService } from 'jslib-common/services/api.service';
|
||||
|
||||
import { EnvironmentService } from 'jslib-common/abstractions/environment.service';
|
||||
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
||||
import { TokenService } from 'jslib-common/abstractions/token.service';
|
||||
|
||||
@@ -15,8 +16,9 @@ import { TokenService } from 'jslib-common/abstractions/token.service';
|
||||
|
||||
export class NodeApiService extends ApiService {
|
||||
constructor(tokenService: TokenService, platformUtilsService: PlatformUtilsService,
|
||||
logoutCallback: (expired: boolean) => Promise<void>, customUserAgent: string = null) {
|
||||
super(tokenService, platformUtilsService, logoutCallback, customUserAgent);
|
||||
environmentService: EnvironmentService, logoutCallback: (expired: boolean) => Promise<void>,
|
||||
customUserAgent: string = null) {
|
||||
super(tokenService, platformUtilsService, environmentService, logoutCallback, customUserAgent);
|
||||
}
|
||||
|
||||
nativeFetch(request: Request): Promise<Response> {
|
||||
|
||||
Reference in New Issue
Block a user