Ends in:
0 DAY
22 HRS
43 MIN
33 SEC
Ends in:
0 D
22 H
43 M
33 S

Activities of "paul.harriman"

Answer

Maybe an injection token is needed?

Answer

Just making sure case doesn't get closed for inactivity

Answer

Mahmut,

Any update on this?

hi,

I just want to make sure I understand what you said above. Are you saying that if our solution was an MVC/Blazor solution, this wouldn't be a problem? The slide would exist?

IE, because we are using an angular and .netcore solution, we do not get the slide.

maliming,

Part of the reason we adjusted the lifetimes above was to make it easier to test. I have some of the code changes locally as I'm developing. I have the scope removed, but not the lifetime adjustments.

It appears that when we just remove the offline_access, we will get logged out after ~1 hour. Meaning even if you're in the middle of something, you get brought back to the screen where you need to enter your credentials. So the time does not "slide". Is there a way to "slide" (meaning while the user is active, they stay logged in, but when they go idle for 1 hour, they get logged out)?

  • ABP Framework version: v7.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Create new angular website using suite/cli.

  • Start up website and login.
  • Close the tab/browser
  • Come back 1+ hours later and start up website
  • You will be presented with the login screen,
  • Click login and get into the site without entering credentials which is a severe security risk

Is there a way without custom code of getting logged out after closing the browser tab/browser? We do use an npm package called angular idle that looks for inactivity on the website and then will log you out. But if just you close the tab/browser you are still logged in and can come back the future without credentials.

We have tried using window.unload and removing cookies in localStorage. This appears to work, but there are some situations in which you will be prevented from logging in. using the auth service to logout does not work. probably becuae it is an async process and does not make the tab/browser wait before closing We have tried adding middleware to set lifetimes, that doesn't work

    PreConfigure<OpenIddictServerBuilder>(builder =>
    {
        builder.SetAuthorizationCodeLifetime(TimeSpan.FromMinutes(1));
        builder.SetAccessTokenLifetime(TimeSpan.FromMinutes(1));
        builder.SetIdentityTokenLifetime(TimeSpan.FromMinutes(1));
        builder.SetRefreshTokenLifetime(TimeSpan.FromDays(1));
    });

We could write an angular interceptor and use o-auth service to invalidate the token. This will not work for mvc sites

Ultimately, we want something on the backend which will force a logout if the user has been idle for a period of time. We can see there is are cookies in localStorage: id_token_expires_at expiresAt with expiration times

We understand that the refresh token plays a role in this, but that we want a hard lifetime when it would not play a role.

Answer

Mahmut, Maybe this will help Here's a brand new 7.1 abp site with angular (this is the latest, our current app is a version behind, but the problem still exists), no mobile and added stubbed file for alerts. Unfortunately, I did not do a git init before adding alerts. The changes are:

  • adding the folder and contents mobile-navbar
  • adding replaceableComponent in app.component
  • adding modulefor mobile-navbar in app.module The solution was cleaned and node_modules, .angular files were removed https://github.com/Dovernh/ABP71.MobileNavbar
Answer

Mahmut,

Thanks for the quick reply. Here's more info on my issue. This is my customized template that I have (below). I have already commented out the code you described. I want what is there before login Home, Settings, Red button, EMPTY, Alerts and then after login I want Admin to be on the toolbar. Home, Settings, Red button, Admin, Alerts

The problem that is after login, my custom code is not executed (there are breakpoints in the ngOnInit, before login the breakpoints are hit). The original mobile nav bar code is. If I click the big red button, you can see the breakpoints being hit and then the mobile navbar displays as I want

<div class="lpx-mobile-navbar-container">
  <div class="lpx-mobile-navbar">
    <ul class="lpx-mobile-nav-tabs">
      <!-- <li class="lpx-mobile-nav-tab"
        *ngFor="let tab of navTabs"
        [routerLink]="tab.link"
        [routerLinkActive]="tab.link ? 'selected' : ''"
        [routerLinkActiveOptions]="{ exact: tab.link === '/' }"
        [class.selected]="tab.expanded">
        <a class="lpx-mobile-nav-item">
          <lpx-icon class="menu-item-icon"
            *ngIf="tab.icon"
            [iconClass]="tab.icon"></lpx-icon>
          <span class="mobile-item-text">
            {{ tab.mobileMenuText || tab.text | toObservable | async }}
          </span>
        </a>
      </li> -->

      <li class="lpx-mobile-nav-tab"
        (click)="toggleMenu('settings', settingsMenuItems)"
        [class.selected]="activeMenu === 'settings'">
        <a class="lpx-mobile-nav-item">
          <lpx-icon class="menu-item-icon"
            iconClass="fas fa-home"></lpx-icon>
          <span class="mobile-item-text">
            {{ "Home" | lpxTranslate | async }}
          </span>
        </a>
      </li>

      <li class="lpx-mobile-nav-tab"
        (click)="toggleMenu('settings', settingsMenuItems)"
        [class.selected]="activeMenu === 'settings'">
        <a class="lpx-mobile-nav-item">
          <lpx-icon class="menu-item-icon"
            iconClass="gearConnected"></lpx-icon>
          <!-- TODO: PROVIDE API -->
          <span class="mobile-item-text">{{
            settingsTitle | lpxTranslate | async
            }}</span>
        </a>
      </li>

      <li class="lpx-mobile-nav-tab menu-toggle">
        <a class="lpx-mobile-hamburger"
          [ngClass]="toggleClass"
          (click)="toggleNavbarMenu()">
          <span class="hamburger-icon"
            aria-hidden="true"
            [class.lpx-mobile-menu-opn]="activeMenu === 'navbar'">
            <span class="icon-part"></span>
            <span class="icon-part"></span>
            <span class="icon-part"></span>
            <span class="icon-part"></span>
            <span class="icon-part"></span>
            <span class="icon-part"></span>
          </span>
        </a>
      </li>

      <li class="lpx-mobile-nav-tab"
        (click)="profileMenuItems && toggleMenu('profile', profileMenuItems)"
        [class.selected]="activeMenu === 'profile'">
        <a class="lpx-mobile-nav-item">
          <lpx-avatar [avatar]="userProfile.avatar"></lpx-avatar>
          <span class="mobile-item-text">{{ userProfile.userName }}</span>
        </a>
      </li>

      <li class="lpx-mobile-nav-tab"
        (click)="profileMenuItems">
        <a class="lpx-mobile-nav-item otised-alerts">
          <otised-notification-icon />
          <div class="mobile-item-text">{{
            'Alerts' | lpxTranslate | async
            }}</div>
        </a>
      </li>
    </ul>
  </div>

  <div class="lpx-mobile-menu"
    [hidden]="!menuVisible">
    <div class="lpx-logo-container"><lpx-brand-logo></lpx-brand-logo></div>
    <lpx-navbar-routes [navbarItems]="selectedMenuItems"
      (routeClick)="closeMenu()">
    </lpx-navbar-routes>
  </div>
</div>
Question
  • ABP Framework version: v7.0.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I cloned the lepton-x pro code. I copied the mobile-navbar files to my local project. I customized the html to look like I wanted. I added Alerts I added the component to the replacableComponents It looks good except before I login. i can browser refresh, Alerts icon still shows When I login in my breakpoints are not hit in the component and the default mobile nav shows If I click the big red button, my custom code breakpoints are hit. The Alerts icon shows properly If I browser refresh, the default mobile nav shows, my breakpoints are not hit

Not sure what else I need to add to the code. I have not added an injection tokens. Cannot find any documentation to tell me what I did wrong. I am using the latest lepton-x "@volosoft/abp.ng.theme.lepton-x": "^2.1.0",

  • ABP Framework version: v7.0.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Websites created with ABP 7.0.1 have a favicon that is a svg instead of an ico on the login page. On the "Welcome Page", an ico is used. Besides replacing the page (if possible), are there any options for using the favicon ico's that we already have? I tried some online conversions, to convert ico's to svg's and the result is ugly.

Showing 21 to 30 of 80 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 05, 2024, 12:19