Aktivity „Mohammed.sheik“

Hi Maliming,

Angular app directs login to auth server using below url. The redirect_url parameter is set to http://localhost:4200 and that is why I have been trying to redirect to the Angular frontend from Okta.

https://localhost:44322/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%3Fresponse_type%3Dcode%26client_id%3DTokenGen_Angular%26state%3DbFJidFZFX3h6TjUyUGl4el82djhoN3NBfk41ZndyUVNPYXZSRXpmWTdCeGtu%26redirect_uri%3Dhttp%253A%252F%252Flocalhost%253A4200%26scope%3Doffline_access%2520openid%2520profile%2520email%2520phone%2520AccountService%2520IdentityService%2520AdministrationService%2520SaasService%2520ProductService%2520StsApiService%26code_challenge%3DhmA56R3M3SyXUVBVM4z9-ktJLeCD9vuZtD1WnB6Ck04%26code_challenge_method%3DS256%26nonce%3DbFJidFZFX3h6TjUyUGl4el82djhoN3NBfk41ZndyUVNPYXZSRXpmWTdCeGtu%26culture%3Den%26ui-culture%3Den

I changed my Okta app settings to use the auth server url (https://localhost:44322/Account/Login)

and my AuthServerModule looks like this:

.AddOpenIdConnect(OpenIdConnectDefaults.AuthenticationScheme, "Okta", options => { options.Authority = "https://xxxxxx.okta.com/oauth2/default";

            options.ClientId = "my client Id";
            options.ClientSecret = "my client secret";

            options.ResponseType = OpenIdConnectResponseType.Code;

            options.Scope.Clear();
            options.Scope.Add("offline_access");
            options.Scope.Add("openid");
            options.Scope.Add("profile");
            options.Scope.Add("email");

            options.SaveTokens = true;
            options.ResponseMode = OpenIdConnectResponseMode.Query;

            options.Events = new OpenIdConnectEvents
            {
                OnRedirectToIdentityProvider = context =>
                {
                    // Perform any custom logic before redirecting to Okta
                    context.ProtocolMessage.RedirectUri = "https://localhost:44322/Account/Login";
                    return Task.CompletedTask;
                },
            };

        });

The redirect from Okta to my auth server works and the URL params (Code and State) are being set however it does not log me into the application and does not redirect me to Angular frontend.

https://localhost:44322/Account/Login?code=qAv8NcAN5d_rPsx4t7fNceKBlZkp7AkIDl8R-Yu9so8&state=CfDJ8IjnUYbWPldIgDZTpwcFU0gB4Q0ybYB_1VYnSA6GN_EiRo3j98Wp8ImUrMv0kZXlBK7l2gl3a5K9LJFp5tZR8RoSFd7yuT7DP030wHSXTuGip2NBrWeWd9HaOddMm2n7wXpda91YF6qZR8H_AAOWsBXl38Sz1OGQGyANT2pxF_PJMSmR6IzK-96Fa3CdEBkscctikeFjPsnGLEoNxLOkO3JDsJDy3tryVJAvPc8VI9eouKIBDWVO4pmFw1f08O2d9B9M7O2DW4CJr9uebHQ5csfJ5Nc9VgDJAzRmLfHBV6iQrPXLS9OUmsqSavxAVOF8g3qezLdjTp4gedHYfJCPKOm9rfA7rXTIB1_JUSyn0ZOYakV8O3t1kb_CLUIZxAKRA5DIBqA-suxHlhkTk12HqaK8YRixXRR4A2esOA1mb8trOUfSdxYVpGowC6WL4e2fd77zg-jO3Ih3REnG8ifP1TKV16EcK0OVPb76mDYYx0gOEL2dUlTpppcnrmLyaQhCVg

Any thoughts or advice on this?

Hello Mohammed.sheik,

Please do let us know if this solution has worked for you?

If you are still facing the issue, please do share your solution on support@abp.io so that we can help you better.

Awaiting for your response.

Thank You, Anjali

Hi Anjali,

I hope you are doing well. I am still experiencing the above exceptions and unfortunately due to company policy I cannot share the solution. Can we please arrange for a call where I could take you through all my configurations?

Thank you for the great support!

Best Regards, Mohammed

Hi Anjali,

I hope you are well.

Thank you so much for the detailed steps above, it is greatly appreciated. I have followed the steps above however I am running into the issue below:

HI,

I was able to login with default documentation provided by OKTA Can you please try this?

https://developer.okta.com/docs/guides/sign-into-web-app-redirect/asp-net-core-3/main/

Hi There,

Are you able to share your solution?

Hi,

I don't know what blocked you.

Could you describe exactly what problem you're having?

As I understand, you can custom the login model to do it, just check the current tenant.

Hi,

There is no problem. I am looking for guidance on how to integrate with Okta.

When you say "As I understand, you can custom the login model to do it, just check the current tenant.", please can you share documentation on this?

Hi,

Can you share a project that reproduces the problem to me, shiwei.liang@volosoft.com. I will check it.

Hi Shiwei,

Can we rather do a Teams or Zoom call?

Hi,

After injecting ITeantAppService into my AppService and calling 'await _tenantAppService.GetListAsync' I get the following error: Not Found.

In my appsettings.json I have RemoteService config: "RemoteServices": { "Default": { "BaseUrl": "https://localhost:44388/", "UseCurrentAccessToken": "false" } },

Please advise what could be the issue.

Hi There,

Thank you for taking the time to respond. I have reviewed the documentation and made the following changes:

  1. Included the Saas.Application.Contracts.csproj and Saas.HttpApi.Client.csproj project references in my microservice project.
  2. Added the SaasApplicationContractsModule as a dependency in my ApplicationContractsModule.
  3. Added the SaasHttpApiClientModule as a dependency in my ApplicationModule.
  4. Configured the RemoteServices in my microservices appsettings.json.

However, I am facing an issue with the absence of SaasAppService or repositories that can be injected into my microservices application layer to obtain a list of all tenants.

Although this might be a simple task, I am new to ABP, so please bare with me.

hi

As far as I know, swagger cannot customize request parameters.

Is there any way to make this work?

Hi,

Thank you for the support. I have managed to sort out the issue by adding the below in my auth and identity service.

app.Use((context, next) => { context.Request.Scheme = "https"; return next(context); });

Zobrazených 1 až 10 z 14 záznamov
Made with ❤️ on ABP v8.2.0-preview Updated on marca 25, 2024, 15:11