GithubHelp home page GithubHelp logo

Comments (9)

jmprieur avatar jmprieur commented on August 15, 2024 2

Thanks for the clear explanation, @Elanis

I'm not sure this is the right fix, but to make progress towards the issue resolution, I would try to insert a line here:

var login = context.Properties.GetParameter<string>(OpenIdConnectParameterNames.LoginHint);

something like:

context.ProtocolMessage.RedirectUri = "https://example.com";

Please tell me if that worked.

from active-directory-aspnetcore-webapp-openidconnect-v2.

kalyankrishna1 avatar kalyankrishna1 commented on August 15, 2024 1

Could you advise the proxy admins to whitelist Azure AD endpoint "https://login.microsoftonline.com" and allow traffic to pass as is ?

from active-directory-aspnetcore-webapp-openidconnect-v2.

Elanis avatar Elanis commented on August 15, 2024 1

Hello, I don't think so. I don't have any control on the reverse proxy, and it isn't a .NET app.

Is there a way to force redirect_uri on the application side ?

Notes:

Thanks for your help :)

from active-directory-aspnetcore-webapp-openidconnect-v2.

Elanis avatar Elanis commented on August 15, 2024 1

Yeah, thanks, It was fixed.

I got another error with Signature validation but I'll try to fix it by myself first. If I got another stuck or when I find out how to make it work, I'll update this issue to explain how to fix it (if another person have the problem).

from active-directory-aspnetcore-webapp-openidconnect-v2.

Elanis avatar Elanis commented on August 15, 2024

I already made it whitelisted because at first I couldn't couldn't call the AzureAD endpoint, but now, after being connected as my professional account, i got redirected to:
https://login.microsoftonline.com/......?redirect_uri=http://example.com........ instead of https://login.microsoftonline.com/......?redirect_uri=https://example.com.........

Isn't the library (or the web app itself) giving to the AzureAD endpoint the request URI ?

from active-directory-aspnetcore-webapp-openidconnect-v2.

jmprieur avatar jmprieur commented on August 15, 2024

@Elanis : would this article help you? http://josephwoodward.co.uk/2016/07/proxying-http-requests-asp-net-core-using-kestrel ?

from active-directory-aspnetcore-webapp-openidconnect-v2.

Elanis avatar Elanis commented on August 15, 2024

Hello !

The problem fix was indeed:

Thanks for the clear explanation, @Elanis

I'm not sure this is the right fix, but to make progress towards the issue resolution, I would try to insert a line here:

var login = context.Properties.GetParameter<string>(OpenIdConnectParameterNames.LoginHint);

something like:

context.ProtocolMessage.RedirectUri = "https://example.com";

Please tell me if that worked.


The problem I got after this fix was:

SecurityTokenInvalidSignatureException: IDX10503: Signature validation failed.

The fix was to add privileges to the service account running the website.


Thanks @jmprieur, you saved me some hours ! 😃

Problem Solved

from active-directory-aspnetcore-webapp-openidconnect-v2.

tylerforaie avatar tylerforaie commented on August 15, 2024

Hey @jmprieur or anyone else that may be monitoring this closed issue. I am encountering basically the same issue as above however now that Microsoft.Identity.Web is a nuget package things behave a little bit differently. The recommend practice is to use the .AddSignIn() extension and I am unable to see a way to set the redirect url as mentioned above. Any help would be appreciated.

I also made a stackoverflow post and would be receptive to any feedback there as well.

Thanks!

from active-directory-aspnetcore-webapp-openidconnect-v2.

jmprieur avatar jmprieur commented on August 15, 2024

@tylerforaie : I think that this should be addressed by AzureAD/microsoft-identity-web#115, which is next on line to be implemented in Microsoft.identity.Web
cc: @jennyf19 as it's assigned to her.

from active-directory-aspnetcore-webapp-openidconnect-v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.