FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Wrong logout URL being returned ?

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    3
    7
    4.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      francis.ducharme
      last edited by

      I have this problem when logging out my users from my application that I'm being returned the wrong logout URL by FusionAuth.

      I've got two applications configured in FusionAuth. One for "localhost" (for local development) and one "DEV" for our development environment, which is hosted in the cloud.

      The logout url for the "localhost" version of the FusionAuth application is something like: https://localhost:4455/api/FusionAuth/logout

      And the DEV one is the same but hosted in the cloud, https://exampledomain.com/api/FusionAuth/logout

      When users click "Logout" in my app, there are taken to: ourserver.fusionauth.io/oauth2/logout?client_id=the_client_id

      When logging out when locally running the app, the client ends up redirected to the DEV logout url (in the cloud) and when logging out from the DEV instance of our application, the client ends up redirected on "localhost".

      It's the inverse of what I expect. I'm sure I use the correct client_id/secret in both instances so I'm a little confused.

      Any ideas ?

      danD 1 Reply Last reply Reply Quote 0
      • A
        adamsmith104064
        last edited by

        @francis-ducharme said in Wrong logout URL being returned ?:

        I have this problem when logging out my users from my application that I'm being returned the wrong logout URL by FusionAuth.
        I've got two applications configured in FusionAuth. One for "localhost" (for local development) and one "DEV" for our development environment, which is hosted in the cloud.

        When I log out my users from my application, FusionAuth returns the incorrect logout URL.

        FusionAuth has two apps setup for me. One for "localhost" (for local work) and one for "DEV" (for our cloud-based development environment).

        1 Reply Last reply Reply Quote -1
        • danD
          dan @francis.ducharme
          last edited by

          @francis-ducharme Hi Francis,

          Is this still an issue? I'd review your application configuration (in the 'Applications' tab) to double check that the logout url is correct there.

          Also, it'd be helpful to know the version of FusionAuth you are running.

          --
          FusionAuth - Auth for devs, built by devs.
          https://fusionauth.io

          F 2 Replies Last reply Reply Quote 0
          • F
            francis.ducharme @dan
            last edited by

            @dan said in Wrong logout URL being returned ?:

            @francis-ducharme Hi Francis,

            Is this still an issue? I'd review your application configuration (in the 'Applications' tab) to double check that the logout url is correct there.

            Also, it'd be helpful to know the version of FusionAuth you are running.

            Hi Dan! Sorry for the delay in responding. Everything seems fine on my end

            This is the config for my "Dev" version of the application

            3797aa38-be50-4b37-a44c-2c7d051b6c58-image.png

            As you see, I'm supposed to be redirected to an URL on the internet, but here's what I see in Chrome network tab

            4b0b0179-4eca-4cf1-9ce6-c3c49907dff0-image.png

            "localhost" is what I have in the Logout URL for the "local" version of the app (what the devs use when developing locally on their PC)

            We use version 1.32.0.

            Thanks!

            1 Reply Last reply Reply Quote 1
            • F
              francis.ducharme @dan
              last edited by francis.ducharme

              @dan said in Wrong logout URL being returned ?:

              @francis-ducharme Hi Francis,

              Is this still an issue? I'd review your application configuration (in the 'Applications' tab) to double check that the logout url is correct there.

              Also, it'd be helpful to know the version of FusionAuth you are running.

              Hi Dan! I have upgraded to the latest version and this is still an issue. It seems the logout URL being returned is being confused between different versions of the app (localhost, dev, staging, etc).

              danD 1 Reply Last reply Reply Quote 0
              • danD
                dan @francis.ducharme
                last edited by

                @francis-ducharme What is your setting for logoutBehavior for each application config? All applications or redirect only?

                By default it is 'all applications' which means that FusionAuth, on logout, will call each application's logout url (to ensure that the user is logged out of all applications). It does this via an iframe, so I'd expect both to be requested. https://fusionauth.io/docs/v1/tech/guides/single-sign-on#configure-the-applications-in-fusionauth has a bit more.

                I'm not sure why you are ending up at localhost for the dev app, though.

                --
                FusionAuth - Auth for devs, built by devs.
                https://fusionauth.io

                F 1 Reply Last reply Reply Quote 0
                • F
                  francis.ducharme @dan
                  last edited by

                  @dan said in Wrong logout URL being returned ?:

                  @francis-ducharme What is your setting for logoutBehavior for each application config? All applications or redirect only?

                  By default it is 'all applications' which means that FusionAuth, on logout, will call each application's logout url (to ensure that the user is logged out of all applications). It does this via an iframe, so I'd expect both to be requested. https://fusionauth.io/docs/v1/tech/guides/single-sign-on#configure-the-applications-in-fusionauth has a bit more.

                  I'm not sure why you are ending up at localhost for the dev app, though.

                  That was it. All my application's logout behavior were set to "All Applications". "Redirect" only made it so the browser doesn't get redirected to "localhost".

                  Thanks!

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post