Skip to content

Commit

Permalink
Fix login in Safari (#90)
Browse files Browse the repository at this point in the history
* refactor: Remove console.logs

* fix(authentication): Implement jwt interceptors

* chore: Update knora-ui packages
  • Loading branch information
kilchenmann authored Sep 27, 2019
1 parent f8bac52 commit 6f2e474
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { HttpClient, HttpClientModule } from '@angular/common/http';
import { HttpClient, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { APP_INITIALIZER, NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { KuiActionModule } from '@knora/action';
import { KuiAuthenticationModule } from '@knora/authentication';
import { KuiAuthenticationModule, JwtInterceptor, WithCredentialsInterceptor } from '@knora/authentication';
import { KuiCoreConfigToken, KuiCoreModule } from '@knora/core';
import { KuiSearchModule } from '@knora/search';
import { KuiViewerModule } from '@knora/viewer';
Expand Down Expand Up @@ -179,7 +179,9 @@ export function initializeApp(appInitService: AppInitService) {
{
provide: KuiCoreConfigToken,
useFactory: () => AppInitService.coreConfig
}
},
{ provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
{ provide: HTTP_INTERCEPTORS, useClass: WithCredentialsInterceptor, multi: true }
],
bootstrap: [AppComponent]
})
Expand Down
2 changes: 1 addition & 1 deletion src/app/main/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class HeaderComponent {
* Navigate to the login page
*/
goToLogin() {
console.log(decodeURI(this._router.url));
// console.log(decodeURI(this._router.url));
this._router.navigate(['login'], {
queryParams: {
returnUrl: decodeURI(this._router.url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class ListInfoFormComponent implements OnInit {
// console.log(result);
// this.closeDialog.emit(result);
this.newList = result;
console.log(this.newList)

this.updateParent.emit(result.listinfo.labels[0].value + ' (' + result.listinfo.labels[0].language + ')');
this.loading = false;
// setTimeout(() => {
Expand Down

0 comments on commit 6f2e474

Please sign in to comment.