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.
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 ?
-
@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).
-
@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.
-
@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
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
"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!
-
@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).
-
@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.
-
@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!