Open Closed

{0} not replaced with hostname in Angular multi-tenancy #759


User avatar
0
MichelZ created
  • ABP Framework version: v4.1-rc2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): yes
  • Exception message and stack trace: N/A
  • Steps to reproduce the issue: N/A

Hi

We are trying to deploy a multi-tenant angular application with a separate identity server component. It seems like we're not able to get the angular application to use the tenant hostname in the redirectUri parameter.

According to this: https://docs.abp.io/en/abp/latest/UI/Angular/Multi-Tenancy#domain-tenant-resolver we have set the environment config like this:

`
export const environment = {
  production: true,
  application: {
    baseUrl: "https://{0}.app.staging.us.domain.cloud",
    name: 'My',
  },
  oAuthConfig: {
    issuer: 'https://identity.staging.us.domain.cloud',
    redirectUri: "https://{0}.app.staging.us.domain.cloud",
    clientId: 'My_App',
    responseType: 'code',
    scope: 'offline_access My',
  },
  apis: {
    default: {
      url: 'https://ep.staging.us.domain.cloud',
      rootNamespace: 'DO.My',
    },
  },
} as Environment;`

it does seem to resolve the tenant with: https://ep.staging.us.domain.cloud/api/abp/multi-tenancy/tenants/by-name/test

and we get a response: {"success":true,"tenantId":"4035a222-3aaf-d3ec-9ba7-39f9d56a9864","name":"test"}

but the redirect to the identity component is: https://identity.staging.us.domain.cloud/connect/authorize?response_type=code&client_id=My_App&state=randomblah&redirect_uri=https://{0}.app.staging.us.domain.cloud&scope=openid offline_access My&code_challenge=randomblah&code_challenge_method=S256&nonce=randomblah

note that {0} did not get replaced with the tenant name. The URL we're using in the browser is: https://test.app.staging.us.domain.cloud

Any ideas what we're doing wrong?

Thanks & Regards Michel


7 Answer(s)
  • User Avatar
    0
    Mehmet created

    Hi @MichelZ

    We are working on this, thanks for the reporting.

  • User Avatar
    0
    MichelZ created

    Hi @Mehmet

    Anything new to report here? We have updated to 4.1 final, and see the same issue there.

    Thanks Michel

  • User Avatar
    0
    Mehmet created

    Hi Michel,

    You can follow this issue: https://github.com/abpframework/abp/issues/7087

    We will probably fix the problem until the v4.2-preview is released. I will inform you when we solve the problem.

    Sorry for the inconvenience.

  • User Avatar
    0
    MichelZ created

    Hi Mehmet

    This doesn't look like a public repo/issue?

    /Michel

  • User Avatar
    0
    Mehmet created

    Sorry, it was an internal issue. I have updated the comment. Please check the link again.

  • User Avatar
    0
    Mehmet created

    Hi Michel,

    The problem has been resolved. You can use it as of v4.1.1.

    I am closing the question. Please let us know if you encounter any problems.

    Thanks.

  • User Avatar
    0
    alper created
    Support Team Director

    your question credit has been refunded

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