Oauth Login

Hi, I have my application configured to use Okta Oauth. (Previously I had it working with google aswell). The log in system is working as expected. However I am struggling to get the logout side working. Example of what I am currently running

python3 -m panel serve app2.py --unused-session-lifetime 5000 \
--check-unused-sessions 5000 --oauth-provider=okta \
--oauth-key="{oath_key}" \
--oauth-secret="{oauth_secret}" \
--cookie-secret="{cookie_secret}" \
--oauth-extra-params="{'server': 'default', 'url': '{okta_url}" \
--oauth-encryption-key="oauth_encryption_key" \
--log-level='trace'

As a minimal app I created the following:

import panel as pn

logout = pn.widgets.Button(name="Logout", button_type="default").servable()

def logout_route(event):

    pn.state.location.pathname = pn.state.location.pathname.split("/")[0] + "/logout"

    pn.state.location.reload = True

logout.on_click(logout_route)

Upon clicking this button to hit the /logout url, it reloads the page and the user is still logged in. No real evidence in the logs about how the cookies are dealt with or anything related.

Is it possible to log out the user from the Oauth provider. As a side note. This above is running on my localhost. I have my program running in production on Azure with the Okta Oauth working. But haven’t managed to get the logout working there either. Tried both /logout and /.auth/logout as urls but they don’t actually log out of Okta.

Would i be correct in saying that I need to actually hit the Okta logout endpoint myself? Or can it be done through panel?

Thanks