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...
GarethParry
Copper Contributor
Hi,
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
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
chilberto
Sep 18, 2022Iron Contributor
Yes, 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 🙂
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
- chilbertoSep 21, 2022Iron ContributorHello Gareth,
I primarily work in c# and have not touched VB since the early 2000s. I see a good resource of examples at https://www.example-code.com/vbnet/oauth2.asp
One thing that is interesting, is the examples use json files for the configuration. This makes me think in your situation the configuration might be coming from a file or database of some kind.
Another good example: https://www.gemboxsoftware.com/email/examples/authenticate-using-oauth-c-sharp-vb/109
Unfortunately my only suggestion is keep searching. Keywords like Http, HttpWebRequest. And you might get lucky depending on who wrote the code with words like oauth and redirect.