Open Closed

Switching the Account using Linked accounts not loading the latest user context until reloads the page after unparaded to 7.2.2 #5107


User avatar
0
raju.thinnaluri@gmail.com created

Hi,

We implemented the Blazor app as a SaaS in microservice template.

I have a user account in all the Tenants and Linked the accounts. while switching the accounts the switched user not loading the switched user context after opening the blazer app, it switching user context only after reloads the page

  1. trying to switch

  2. after switching also it showing old user

  3. after reload (refresh) the page it showing actual switched user If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v7.2.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace: no error message
  • Steps to reproduce the issue:" create user in different tenants and link the accounts then try to switch the user

12 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share the full steps so I can reproduce it in a new template project?

    Thanks

  • User Avatar
    0
    raju.thinnaluri@gmail.com created

    hi

    Can you share the full steps so I can reproduce it in a new template project?

    Thanks

    1. Created the new application using microservice template, and UI frame work Blazor WebAssembly
    2. Create multiple Tenants
    3. created same user in all the Tenants
    4. link the user accounts with user created under Host
    5. Login as Host user
    6. Then using My Account -> linked Users -> Login as This user from different Tenant
    7. then open the blazor app it still showing the host user until refresh the page

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks I will check it.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Are you login linked user on Account/Manage page of the AuthServer website?

    https://localhost/Account/Manage

  • User Avatar
    0
    raju.thinnaluri@gmail.com created

    Hi,

    Yes from AuthServer using "Linked Accounts" option am trying to switch the user

    After Switching the User, redirecting from AuthServer to Blazor App

    but after redirecting to blazor app the new user context not updating until I force reload the page

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can redirect to a special page of blazor and re-login on the page.

    eg

    Navigation.NavigateToLogin("authentication/login");
    
  • User Avatar
    0
    raju.thinnaluri@gmail.com created

    Hi,

    Am able to redirect the the Blazor app, but it's not taking the latest user account what i switched.

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    it switching user context only after reloads the page

    I mean you can reload the page by code.

    https://support.abp.io/QA/Questions/5107#answer-3a0b692f-e52a-cde1-f2b7-cf0f255391e1

  • User Avatar
    0
    raju.thinnaluri@gmail.com created

    Hi,

    after login into auth server can we redirect to Blazor app from auth server?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Yes, Just like you did.

  • User Avatar
    0
    raju.thinnaluri@gmail.com created

    Hi,

    yes previously working fine with version 5.3.2.

    But after upgraded to vrsion 7.2.2 still able to redirect to Blazor app, but the user context not updating after redirected to Blazor App. only when i refresh the blazor app then only taking latest user context.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Did you try this?

    Navigation.NavigateToLogin("authentication/login");

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11