Forum Discussion
GarethParry
Sep 14, 2022Copper Contributor
How do i test an application which uses OWIN login
Hi, I have built a web application that usesOWIN security to authenticate users againt Azure Active Directory. I have added the re-direct URL to Azure so that after successful authentication it goes...
chilberto
Sep 15, 2022Iron Contributor
Hello Gareth,
You will need to specify the re-direct to your local endpoint. In case you are not aware, the redirect happens at the client (browser) so a local reference (for example, https://localhost:7071/mywebsite) is ok.
You will also need to add teh redirect url in your application registration in AAD.
You will need to specify the re-direct to your local endpoint. In case you are not aware, the redirect happens at the client (browser) so a local reference (for example, https://localhost:7071/mywebsite) is ok.
You will also need to add teh redirect url in your application registration in AAD.
- GarethParrySep 16, 2022Copper ContributorHi,
if i add it against my application registration in AAD then it still goes to the first re-direct which is the live version.
i need to add something in my VB project?
thanks
Gareth- chilbertoSep 18, 2022Iron ContributorYes, you do. The redirect information is in the URL that your application sends to AAD. In my words, your local application on your pc constructs a URL for AAD. That contains who the application is including what location (url) AAD should send the browser back to once AAD is done authenticating the user.
This means your application needs to add the redirect url in the message. Your VB is already doing this and most likely it is in a configuration file. Have a search for the url in your code base. You might get lucky, find the value and simply be able to replace it with your local. Just don't forget to reverse the change before submitting your changes 🙂- GarethParrySep 21, 2022Copper Contributori have been through the code, the vbproj, the sln and applicationhost.config and cannot see any mention of the live server