Activities of "mgurer"

Thanks.

Can you share the type of the options variable. It is not stated in the document.

Any suggestions?

By the way, the I have checked your answer. On localhost, the app runs as you described. Theme cookies are set on "localhost" domain and ports are ignored. So same cookie for both sites are shared.

On production, I have two seperate subdomain. admin.mysite.com and auth.mysite.com The theme cookies are set for each domain individualy and the values differ between cookies so the experience is broken.

Hello, I will check your reply.

Actually I am not interested about the blazor admin UI. I have a custom UI admin app implemented with VUE. I can not figure out how to open auth-server app so that it renders specific theme. Maybe I can pass a querystring param to the auth-server redirect url.

  • ABP Framework version: v7.4.2
  • UI Type: Blazor WASM
  • Database System: EF Core (PostgreSQL) /
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue: Hello, is there a way to pass active theme name between ui app and auth server. When I select dark theme in blazor admin ui and click the login button, the page redirects to auth-server ui where light theme is selected. My client asks if the selected theme can be preserved between ui apps. Are there built in solution for this request?

thanks.. it helps..

well, I have checked the code. the value of the context.returnurl is url encoded so related regex expressions never works as expected. there is an issue there.

furthermore if regex gets fixed, it will not work either, at least for my case. because, returnurl contains the original return_uri(double-encoded) and when we alter the return_uri by replacing culture params, there is an inner security check that expects return_uri not to be altered which throws error indicating that uri is altered. this check is part of authorization code flow, and makes sense. otherwise some one in the middle could alter the returl_url and take control.

so, i guess i need to alter return_uri just before the redirection so that return_uri security checks passes.

public virtual Task ReplaceAsync(QueryStringCultureReplacementContext context) { if (!string.IsNullOrWhiteSpace(context.ReturnUrl)) { if (context.ReturnUrl.Contains("culture=", StringComparison.OrdinalIgnoreCase) && context.ReturnUrl.Contains("ui-Culture=", StringComparison.OrdinalIgnoreCase)) { context.ReturnUrl = Regex.Replace( context.ReturnUrl, "culture=[A-Za-z-]+", $"culture={context.RequestCulture.Culture}", RegexOptions.Compiled | RegexOptions.IgnoreCase);

            context.ReturnUrl = Regex.Replace(
                context.ReturnUrl,
                "ui-culture=[A-Za-z-]+",
                $"ui-culture={context.RequestCulture.UICulture}",
                RegexOptions.Compiled | RegexOptions.IgnoreCase);
        }
    }

    return Task.CompletedTask;
}

Hi,

Thanks. This resolves half of my problem. Now I can control the language of Auth-Server.

The second part of my question still needs to be answered?

When I change the UI language on Auth-Server, how can I transfer this info back to the original calling UI. The login process completes by redirecting back to redirect_url parameter passed to auth-server from calling ui app. I need to manipulate this redirect_url before actualy redirecting it.

Here is an example;

  • https://authserverul/connect/authorize?response_type=code&client_id=psp_swagger_client&redirect_uri=https%3A%2F%2Fmyuiapp%2Fswagger%2Foauth2-redirect.html&scope=AccountService&state=V2VkIE5vdiAyOSAyMDIzIDA5OjM5OjA1IEdNVCswMzAwIChHTVQrMDM6MDAp&culture=en-EN&ui-culture=en-EN This opens authserverurl and has a redirect_uri in it. authserver redirects back to this redirect_uri. I need to add ui-culture info into this redirect_uri so that calling ui app can detect the ui-language selection change occured in auth-server site.
  • ABP Framework version: v7.4.1
  • UI Type: Blazor
  • Database System: PostgreSQL
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue: Hello, I have a vue client app and I use authserver with authorization_code flow to authenticate my users. I want to synchronise active language between these apps. I want to pass the active language code to authserver and set the current language and also when I switch the active language on authserver side, I want to transfer the new language to vue app after authentication completes. Maybe I may add an extra parameter to redirect url, but I could not figure out how to do that. Can you help for that? This synchronisation issue also exists between built in blozor ui app and auth-server too. Thanks.

Thanks

Showing 11 to 20 of 59 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13