What is the real purpose of Redirect_Uri in OpenIdConnect?In the shell, what does “ 2>&1 ” mean?Integrating Azure AD applications into Office 365 App LauncherWhy do I get error AADSTS65001 when using scope user.readwrite.all when I have admin consentAzure Active Directory account ownership transferUsing Azure Active Directory token in ASP.Net Core Web API with UseJwtBearerAuthenticiationPost_Logout_Redirect_Uri does not redirect when authenticating using azureHow to support multiple login scenarios in multi-tenanted Azure Active Directory (AAD)Using same authentication for EWS API and Graph APIredirect user to homepage after login with microsoft accountGetting AzureAD implicit flow working with Swagger UI

Is space radiation a risk for space film photography, and how is this prevented?

Repeated! Factorials!

Can I enter a rental property without giving notice if I'm afraid a tenant may be hurt?

Does the Voyager team use a wrapper (Fortran(77?) to Python) to transmit current commands?

How do I get the =LEFT function in excel, to also take the number zero as the first number?

Does the length of a password for Wi-Fi affect speed?

Did the Sith know of Force ghosts?

Purchased new computer from DELL with pre-installed Ubuntu. Won't boot. Should assume its an error from DELL?

How do these cubesats' whip antennas work?

Was Richard I's imprisonment by Leopold of Austria justified?

Why do private jets such as Gulfstream fly higher than other civilian jets?

Are children a reason to be rejected for a job?

Why does putting a dot after the URL remove login information?

Determine Beckett Grading Service (BGS) Final Grade

Why do proponents of guns oppose gun competency tests?

Probably terminated or laid off soon; confront or not?

Add room number to postal address?

Do any languages mention the top limit of a range first?

The size of sheafification

Why should I "believe in" weak solutions to PDEs?

Where to pee in London?

Is there such thing as a "3-dimensional surface?"

Premier League simulation

Traveling from Germany to other countries by train?



What is the real purpose of Redirect_Uri in OpenIdConnect?


In the shell, what does “ 2>&1 ” mean?Integrating Azure AD applications into Office 365 App LauncherWhy do I get error AADSTS65001 when using scope user.readwrite.all when I have admin consentAzure Active Directory account ownership transferUsing Azure Active Directory token in ASP.Net Core Web API with UseJwtBearerAuthenticiationPost_Logout_Redirect_Uri does not redirect when authenticating using azureHow to support multiple login scenarios in multi-tenanted Azure Active Directory (AAD)Using same authentication for EWS API and Graph APIredirect user to homepage after login with microsoft accountGetting AzureAD implicit flow working with Swagger UI






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am trying to setup OpenID Connect Authentication (Single-tenanted) for my web application. I understand how Reply Url in AAD is supposed to work. AAD admin registers a web application with SignInUrl, ReplyUri, AppIdUri,.. Microsoft AAD handles the complete user experience to prompt & validate the credentials. An attacker may not be able to pose legitimate site attack (since it is *.microsoftonline.com page).



Questions:



  1. What is the real purpose of Redirect_Uri in OpenIdConnect? Does it fight Redirect_Uri Attack?


  2. I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?


Please suggest me how to view Redirect Uri. I would like to harness the real benefit.










share|improve this question






























    0















    I am trying to setup OpenID Connect Authentication (Single-tenanted) for my web application. I understand how Reply Url in AAD is supposed to work. AAD admin registers a web application with SignInUrl, ReplyUri, AppIdUri,.. Microsoft AAD handles the complete user experience to prompt & validate the credentials. An attacker may not be able to pose legitimate site attack (since it is *.microsoftonline.com page).



    Questions:



    1. What is the real purpose of Redirect_Uri in OpenIdConnect? Does it fight Redirect_Uri Attack?


    2. I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?


    Please suggest me how to view Redirect Uri. I would like to harness the real benefit.










    share|improve this question


























      0












      0








      0


      0






      I am trying to setup OpenID Connect Authentication (Single-tenanted) for my web application. I understand how Reply Url in AAD is supposed to work. AAD admin registers a web application with SignInUrl, ReplyUri, AppIdUri,.. Microsoft AAD handles the complete user experience to prompt & validate the credentials. An attacker may not be able to pose legitimate site attack (since it is *.microsoftonline.com page).



      Questions:



      1. What is the real purpose of Redirect_Uri in OpenIdConnect? Does it fight Redirect_Uri Attack?


      2. I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?


      Please suggest me how to view Redirect Uri. I would like to harness the real benefit.










      share|improve this question














      I am trying to setup OpenID Connect Authentication (Single-tenanted) for my web application. I understand how Reply Url in AAD is supposed to work. AAD admin registers a web application with SignInUrl, ReplyUri, AppIdUri,.. Microsoft AAD handles the complete user experience to prompt & validate the credentials. An attacker may not be able to pose legitimate site attack (since it is *.microsoftonline.com page).



      Questions:



      1. What is the real purpose of Redirect_Uri in OpenIdConnect? Does it fight Redirect_Uri Attack?


      2. I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?


      Please suggest me how to view Redirect Uri. I would like to harness the real benefit.







      redirect azure-active-directory






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 27 at 4:25









      Ashokan SivapragasamAshokan Sivapragasam

      7222 silver badges20 bronze badges




      7222 silver badges20 bronze badges

























          2 Answers
          2






          active

          oldest

          votes


















          2















          What is the real purpose of Redirect_Uri in OpenIdConnect?




          From the OpenID Connect, 3.1.2.1 Authentication Request:



          redirect_uri
          REQUIRED. Redirection URI to which the response will be sent.
          This URI MUST exactly match one of the Redirection URI values
          for the Client pre-registered at the OpenID Provider [...]


          So, the purpose of redirect_uri is to tell the OpenID Provider (Azure AD, in your case) where the response to the request should be sent, after the user signs in.




          Does it fight Redirect_Uri Attack?




          The parameter itself offer the functionality described above, it doesn't mitigate any attack. It is the responsibility of the client (i.e. your app) and the OpenID Provider (i.e. Azure AD) to ensure they are doing the right thing to prevent exposing the risk of an attack (including an attack related to redirections).



          For example, if an OpenID Provider did not validate that the redirect_uri from the request exactly matches a redirection URI configured for the client, then an attacker might be able to construct an authorization request with a redirect_uri pointing to a URL controlled by the attacker, and then trick a user into triggering the request. The response to the request would then be sent to the attacker, rather than to the relying party the user thinks they're signing in to.



          There are other attacks related to redirect_uri which could happen if the relying party (i.e. your app, in this case) exposed a vulnerability (for example, by enabling an open redirection attack, or by authorizing a reply URL which is not actually in your control).



          Many of these (and other) attacks, as well as the current best practices to mitigate or prevent them, are described in OAuth 2.0 Security Best Current Practice.




          I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?




          This seems like there is an issue in your application. When Azure AD detects that the requested redirect_uri does not exactly match an authorized reply URI for the client, Azure AD does not redirect back to the client with an authorization code or any tokens.



          It is possible that your app had already established a session previously, or is incorrectly processing the OpenID Connect flow. It's impossible to say without knowing the specific details of how the app is implemented.






          share|improve this answer

























          • Redirect_Uri does not behave well when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error. Only for localhost Urls

            – Ashokan Sivapragasam
            Mar 27 at 11:55











          • Microsoft AAD is my Open ID Provider now. It validates the reply-url-mismatch only when Urls are not localhost.

            – Ashokan Sivapragasam
            Mar 27 at 11:57


















          1














          Now I think I found the mystery behind the signin-redirect_uri anomalies.



          Questions:




          1. What is the real purpose of Redirect_Uri in OpenIdConnect? Does it fight Redirect_Uri Attack?



            [OP] Yes, it does. If redirect_uri domain differs from AAD server Registration and web client, it invalidates the sign-in attempt.




          2. I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?



            [OP] Redirect_Uri does not behave when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error.



          Please note that Redirect_Uri does handle Open redirect attack if an attacker wants to redirect the victim to illegitimate page for re-entering the credentials.






          share|improve this answer



























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369805%2fwhat-is-the-real-purpose-of-redirect-uri-in-openidconnect%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2















            What is the real purpose of Redirect_Uri in OpenIdConnect?




            From the OpenID Connect, 3.1.2.1 Authentication Request:



            redirect_uri
            REQUIRED. Redirection URI to which the response will be sent.
            This URI MUST exactly match one of the Redirection URI values
            for the Client pre-registered at the OpenID Provider [...]


            So, the purpose of redirect_uri is to tell the OpenID Provider (Azure AD, in your case) where the response to the request should be sent, after the user signs in.




            Does it fight Redirect_Uri Attack?




            The parameter itself offer the functionality described above, it doesn't mitigate any attack. It is the responsibility of the client (i.e. your app) and the OpenID Provider (i.e. Azure AD) to ensure they are doing the right thing to prevent exposing the risk of an attack (including an attack related to redirections).



            For example, if an OpenID Provider did not validate that the redirect_uri from the request exactly matches a redirection URI configured for the client, then an attacker might be able to construct an authorization request with a redirect_uri pointing to a URL controlled by the attacker, and then trick a user into triggering the request. The response to the request would then be sent to the attacker, rather than to the relying party the user thinks they're signing in to.



            There are other attacks related to redirect_uri which could happen if the relying party (i.e. your app, in this case) exposed a vulnerability (for example, by enabling an open redirection attack, or by authorizing a reply URL which is not actually in your control).



            Many of these (and other) attacks, as well as the current best practices to mitigate or prevent them, are described in OAuth 2.0 Security Best Current Practice.




            I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?




            This seems like there is an issue in your application. When Azure AD detects that the requested redirect_uri does not exactly match an authorized reply URI for the client, Azure AD does not redirect back to the client with an authorization code or any tokens.



            It is possible that your app had already established a session previously, or is incorrectly processing the OpenID Connect flow. It's impossible to say without knowing the specific details of how the app is implemented.






            share|improve this answer

























            • Redirect_Uri does not behave well when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error. Only for localhost Urls

              – Ashokan Sivapragasam
              Mar 27 at 11:55











            • Microsoft AAD is my Open ID Provider now. It validates the reply-url-mismatch only when Urls are not localhost.

              – Ashokan Sivapragasam
              Mar 27 at 11:57















            2















            What is the real purpose of Redirect_Uri in OpenIdConnect?




            From the OpenID Connect, 3.1.2.1 Authentication Request:



            redirect_uri
            REQUIRED. Redirection URI to which the response will be sent.
            This URI MUST exactly match one of the Redirection URI values
            for the Client pre-registered at the OpenID Provider [...]


            So, the purpose of redirect_uri is to tell the OpenID Provider (Azure AD, in your case) where the response to the request should be sent, after the user signs in.




            Does it fight Redirect_Uri Attack?




            The parameter itself offer the functionality described above, it doesn't mitigate any attack. It is the responsibility of the client (i.e. your app) and the OpenID Provider (i.e. Azure AD) to ensure they are doing the right thing to prevent exposing the risk of an attack (including an attack related to redirections).



            For example, if an OpenID Provider did not validate that the redirect_uri from the request exactly matches a redirection URI configured for the client, then an attacker might be able to construct an authorization request with a redirect_uri pointing to a URL controlled by the attacker, and then trick a user into triggering the request. The response to the request would then be sent to the attacker, rather than to the relying party the user thinks they're signing in to.



            There are other attacks related to redirect_uri which could happen if the relying party (i.e. your app, in this case) exposed a vulnerability (for example, by enabling an open redirection attack, or by authorizing a reply URL which is not actually in your control).



            Many of these (and other) attacks, as well as the current best practices to mitigate or prevent them, are described in OAuth 2.0 Security Best Current Practice.




            I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?




            This seems like there is an issue in your application. When Azure AD detects that the requested redirect_uri does not exactly match an authorized reply URI for the client, Azure AD does not redirect back to the client with an authorization code or any tokens.



            It is possible that your app had already established a session previously, or is incorrectly processing the OpenID Connect flow. It's impossible to say without knowing the specific details of how the app is implemented.






            share|improve this answer

























            • Redirect_Uri does not behave well when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error. Only for localhost Urls

              – Ashokan Sivapragasam
              Mar 27 at 11:55











            • Microsoft AAD is my Open ID Provider now. It validates the reply-url-mismatch only when Urls are not localhost.

              – Ashokan Sivapragasam
              Mar 27 at 11:57













            2












            2








            2








            What is the real purpose of Redirect_Uri in OpenIdConnect?




            From the OpenID Connect, 3.1.2.1 Authentication Request:



            redirect_uri
            REQUIRED. Redirection URI to which the response will be sent.
            This URI MUST exactly match one of the Redirection URI values
            for the Client pre-registered at the OpenID Provider [...]


            So, the purpose of redirect_uri is to tell the OpenID Provider (Azure AD, in your case) where the response to the request should be sent, after the user signs in.




            Does it fight Redirect_Uri Attack?




            The parameter itself offer the functionality described above, it doesn't mitigate any attack. It is the responsibility of the client (i.e. your app) and the OpenID Provider (i.e. Azure AD) to ensure they are doing the right thing to prevent exposing the risk of an attack (including an attack related to redirections).



            For example, if an OpenID Provider did not validate that the redirect_uri from the request exactly matches a redirection URI configured for the client, then an attacker might be able to construct an authorization request with a redirect_uri pointing to a URL controlled by the attacker, and then trick a user into triggering the request. The response to the request would then be sent to the attacker, rather than to the relying party the user thinks they're signing in to.



            There are other attacks related to redirect_uri which could happen if the relying party (i.e. your app, in this case) exposed a vulnerability (for example, by enabling an open redirection attack, or by authorizing a reply URL which is not actually in your control).



            Many of these (and other) attacks, as well as the current best practices to mitigate or prevent them, are described in OAuth 2.0 Security Best Current Practice.




            I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?




            This seems like there is an issue in your application. When Azure AD detects that the requested redirect_uri does not exactly match an authorized reply URI for the client, Azure AD does not redirect back to the client with an authorization code or any tokens.



            It is possible that your app had already established a session previously, or is incorrectly processing the OpenID Connect flow. It's impossible to say without knowing the specific details of how the app is implemented.






            share|improve this answer














            What is the real purpose of Redirect_Uri in OpenIdConnect?




            From the OpenID Connect, 3.1.2.1 Authentication Request:



            redirect_uri
            REQUIRED. Redirection URI to which the response will be sent.
            This URI MUST exactly match one of the Redirection URI values
            for the Client pre-registered at the OpenID Provider [...]


            So, the purpose of redirect_uri is to tell the OpenID Provider (Azure AD, in your case) where the response to the request should be sent, after the user signs in.




            Does it fight Redirect_Uri Attack?




            The parameter itself offer the functionality described above, it doesn't mitigate any attack. It is the responsibility of the client (i.e. your app) and the OpenID Provider (i.e. Azure AD) to ensure they are doing the right thing to prevent exposing the risk of an attack (including an attack related to redirections).



            For example, if an OpenID Provider did not validate that the redirect_uri from the request exactly matches a redirection URI configured for the client, then an attacker might be able to construct an authorization request with a redirect_uri pointing to a URL controlled by the attacker, and then trick a user into triggering the request. The response to the request would then be sent to the attacker, rather than to the relying party the user thinks they're signing in to.



            There are other attacks related to redirect_uri which could happen if the relying party (i.e. your app, in this case) exposed a vulnerability (for example, by enabling an open redirection attack, or by authorizing a reply URL which is not actually in your control).



            Many of these (and other) attacks, as well as the current best practices to mitigate or prevent them, are described in OAuth 2.0 Security Best Current Practice.




            I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?




            This seems like there is an issue in your application. When Azure AD detects that the requested redirect_uri does not exactly match an authorized reply URI for the client, Azure AD does not redirect back to the client with an authorization code or any tokens.



            It is possible that your app had already established a session previously, or is incorrectly processing the OpenID Connect flow. It's impossible to say without knowing the specific details of how the app is implemented.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 27 at 11:17









            Philippe SignoretPhilippe Signoret

            8,2011 gold badge26 silver badges44 bronze badges




            8,2011 gold badge26 silver badges44 bronze badges















            • Redirect_Uri does not behave well when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error. Only for localhost Urls

              – Ashokan Sivapragasam
              Mar 27 at 11:55











            • Microsoft AAD is my Open ID Provider now. It validates the reply-url-mismatch only when Urls are not localhost.

              – Ashokan Sivapragasam
              Mar 27 at 11:57

















            • Redirect_Uri does not behave well when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error. Only for localhost Urls

              – Ashokan Sivapragasam
              Mar 27 at 11:55











            • Microsoft AAD is my Open ID Provider now. It validates the reply-url-mismatch only when Urls are not localhost.

              – Ashokan Sivapragasam
              Mar 27 at 11:57
















            Redirect_Uri does not behave well when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error. Only for localhost Urls

            – Ashokan Sivapragasam
            Mar 27 at 11:55





            Redirect_Uri does not behave well when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error. Only for localhost Urls

            – Ashokan Sivapragasam
            Mar 27 at 11:55













            Microsoft AAD is my Open ID Provider now. It validates the reply-url-mismatch only when Urls are not localhost.

            – Ashokan Sivapragasam
            Mar 27 at 11:57





            Microsoft AAD is my Open ID Provider now. It validates the reply-url-mismatch only when Urls are not localhost.

            – Ashokan Sivapragasam
            Mar 27 at 11:57













            1














            Now I think I found the mystery behind the signin-redirect_uri anomalies.



            Questions:




            1. What is the real purpose of Redirect_Uri in OpenIdConnect? Does it fight Redirect_Uri Attack?



              [OP] Yes, it does. If redirect_uri domain differs from AAD server Registration and web client, it invalidates the sign-in attempt.




            2. I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?



              [OP] Redirect_Uri does not behave when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error.



            Please note that Redirect_Uri does handle Open redirect attack if an attacker wants to redirect the victim to illegitimate page for re-entering the credentials.






            share|improve this answer





























              1














              Now I think I found the mystery behind the signin-redirect_uri anomalies.



              Questions:




              1. What is the real purpose of Redirect_Uri in OpenIdConnect? Does it fight Redirect_Uri Attack?



                [OP] Yes, it does. If redirect_uri domain differs from AAD server Registration and web client, it invalidates the sign-in attempt.




              2. I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?



                [OP] Redirect_Uri does not behave when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error.



              Please note that Redirect_Uri does handle Open redirect attack if an attacker wants to redirect the victim to illegitimate page for re-entering the credentials.






              share|improve this answer



























                1












                1








                1







                Now I think I found the mystery behind the signin-redirect_uri anomalies.



                Questions:




                1. What is the real purpose of Redirect_Uri in OpenIdConnect? Does it fight Redirect_Uri Attack?



                  [OP] Yes, it does. If redirect_uri domain differs from AAD server Registration and web client, it invalidates the sign-in attempt.




                2. I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?



                  [OP] Redirect_Uri does not behave when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error.



                Please note that Redirect_Uri does handle Open redirect attack if an attacker wants to redirect the victim to illegitimate page for re-entering the credentials.






                share|improve this answer













                Now I think I found the mystery behind the signin-redirect_uri anomalies.



                Questions:




                1. What is the real purpose of Redirect_Uri in OpenIdConnect? Does it fight Redirect_Uri Attack?



                  [OP] Yes, it does. If redirect_uri domain differs from AAD server Registration and web client, it invalidates the sign-in attempt.




                2. I tried to send different Redirect_Uri from web client. Microsoft AAD fails by reply urls do not match error. But while refreshing the web application, it is signed in now. Should AAD not invalidate my attempt of logging in with illegitimate redirect uri?



                  [OP] Redirect_Uri does not behave when I hosted my application in localhost even on different ports or same domain. So, it ignores Redirect_Uri validation, if I click on Sign-In despite the first Reply-Uri-Mismatch error.



                Please note that Redirect_Uri does handle Open redirect attack if an attacker wants to redirect the victim to illegitimate page for re-entering the credentials.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 27 at 6:23









                Ashokan SivapragasamAshokan Sivapragasam

                7222 silver badges20 bronze badges




                7222 silver badges20 bronze badges






























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369805%2fwhat-is-the-real-purpose-of-redirect-uri-in-openidconnect%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript