Skip to content

Commit a78dbf4

Browse files
author
Abigail Cabascango
committed
refactor: TTA-115 pass the environment auth variable link to the a tag
1 parent 2e694fb commit a78dbf4

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.dev.env

68 Bytes
Binary file not shown.

src/app/modules/login/login.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ <h3>Please log in</h3>
1111
<button (click)="login() " class="btn btn-primary">login</button>
1212
</div>
1313
<div *ngIf="!isProduction">
14-
<a href="https://uat-backend.auth.ioet.com/authn/login/timeTracker">Login</a>
14+
<button class="btn btn-primary"><a href="{{loginAuth()}}"></a></button>
1515
</div>
1616
</div>

src/app/modules/login/login.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { AzureAdB2CService } from './services/azure.ad.b2c.service';
33
import { Router } from '@angular/router';
44
import { FeatureToggleCookiesService } from '../shared/feature-toggles/feature-toggle-cookies/feature-toggle-cookies.service';
55

6-
import { environment, CLIENT_URL } from 'src/environments/environment';
6+
import { environment, CLIENT_URL, AUTH_URL } from 'src/environments/environment';
77
import { EnvironmentType } from 'src/environments/enum';
88
import { LoginService } from './services/login.service';
99
import { UserService } from '../user/services/user.service';
@@ -22,6 +22,7 @@ declare global {
2222
export class LoginComponent implements OnInit {
2323
isProduction = environment.production === EnvironmentType.TT_PROD_LEGACY;
2424
cliendId = CLIENT_URL;
25+
authUrl = AUTH_URL;
2526
auth2: any;
2627

2728

@@ -115,7 +116,7 @@ export class LoginComponent implements OnInit {
115116
}
116117

117118
loginAuth(): void {
118-
119+
return this.authUrl;
119120
}
120121

121122
}

src/environments/environment.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const environment = {
1313
export const AUTHORITY = process.env['AUTHORITY'];
1414
export const CLIENT_ID = process.env['CLIENT_ID'];
1515
export const CLIENT_URL = process.env['CLIENT_URL'];
16+
export let AUTH_URL = process.env['AUTH_URL'];
1617
export const SCOPES = process.env['SCOPES'].split(',');
1718
export const STACK_EXCHANGE_ID = process.env['STACK_EXCHANGE_ID'];
1819
export const STACK_EXCHANGE_ACCESS_TOKEN = process.env['STACK_EXCHANGE_ACCESS_TOKEN'];

0 commit comments

Comments
 (0)