We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to set up a demo from ngx-admin Angular Frontend by following the instructions with the following code:
/* * Copyright (c) Akveo 2019. All Rights Reserved. * Licensed under the Single Application / Multi Application License. * See LICENSE_SINGLE_APP / LICENSE_MULTI_APP in the 'docs' folder for license information on type of purchased license. */ import { Component, OnInit } from '@angular/core'; import { NbAuthStrategy, NbAuthToken, NbTokenStorage } from '@nebular/auth'; import { environment } from '../environments/environment'; import { AnalyticsService } from './@core/utils'; @Component({ selector: 'ngx-app', template: '<router-outlet></router-outlet>', }) export class AppComponent implements OnInit { constructor(private analytics: AnalyticsService, private authStrategy: NbAuthStrategy, private tokenStorage: NbTokenStorage) { // this.initTestUserToken(); } ngOnInit(): void { this.analytics.trackPageViews(); } initTestUserToken() { const demoTokenInitKey = 'demo_token_initialized'; const demoTokenWasInitialized = localStorage.getItem(demoTokenInitKey); const currentToken = this.tokenStorage.get(); if (!demoTokenWasInitialized && !currentToken.isValid()) { // local storage is clear, let's setup demo user token for better demo experience this.tokenStorage.set(this.authStrategy.createToken<NbAuthToken>(environment.testUser.token)); localStorage.setItem(demoTokenInitKey, 'true'); } } }
However, l've been getting this error when running it locally:
Is there anything I'm missing from the code?
The text was updated successfully, but these errors were encountered:
Okay, i now figured out i was able to get past the error by adding the following code from auth.module.ts:
providers: [ ... { provide: NbAuthStrategy, useClass: NbAuthStrategyOptions }, .... ],
However, I cannot by pass the login page:
How can I bypass this login page?
Sorry, something went wrong.
No branches or pull requests
I'm trying to set up a demo from ngx-admin Angular Frontend by following the instructions with the following code:
However, l've been getting this error when running it locally:
Is there anything I'm missing from the code?
The text was updated successfully, but these errors were encountered: