Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: TTA-115 pass the environment auth variable link to the a tag
  • Loading branch information
Abigail Cabascango committed Oct 7, 2022
commit a78dbf4808bb20156535e256ceff11bad8029413
Binary file modified .dev.env
Binary file not shown.
2 changes: 1 addition & 1 deletion src/app/modules/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ <h3>Please log in</h3>
<button (click)="login() " class="btn btn-primary">login</button>
</div>
<div *ngIf="!isProduction">
<a href="https://uat-backend.auth.ioet.com/authn/login/timeTracker">Login</a>
<button class="btn btn-primary"><a href="{{loginAuth()}}"></a></button>
</div>
</div>
5 changes: 3 additions & 2 deletions src/app/modules/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AzureAdB2CService } from './services/azure.ad.b2c.service';
import { Router } from '@angular/router';
import { FeatureToggleCookiesService } from '../shared/feature-toggles/feature-toggle-cookies/feature-toggle-cookies.service';

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


Expand Down Expand Up @@ -115,7 +116,7 @@ export class LoginComponent implements OnInit {
}

loginAuth(): void {

return this.authUrl;
}

}
1 change: 1 addition & 0 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const environment = {
export const AUTHORITY = process.env['AUTHORITY'];
export const CLIENT_ID = process.env['CLIENT_ID'];
export const CLIENT_URL = process.env['CLIENT_URL'];
export let AUTH_URL = process.env['AUTH_URL'];
export const SCOPES = process.env['SCOPES'].split(',');
export const STACK_EXCHANGE_ID = process.env['STACK_EXCHANGE_ID'];
export const STACK_EXCHANGE_ACCESS_TOKEN = process.env['STACK_EXCHANGE_ACCESS_TOKEN'];
Expand Down