Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oauth_expiry cookie provides incorrect information when using refresh_token #6684

Closed
1 task done
nenb opened this issue Apr 6, 2024 · 0 comments · Fixed by #6802
Closed
1 task done

oauth_expiry cookie provides incorrect information when using refresh_token #6684

nenb opened this issue Apr 6, 2024 · 0 comments · Fixed by #6802
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@nenb
Copy link
Contributor

nenb commented Apr 6, 2024

ALL software version info

Python 3.9.18
[GCC 12.2.0] on linux
>>> import panel
>>> panel.__version__
'1.3.8'

Probably not specific to panel version though.

Description of expected behavior and the observed behavior

I am using the generic OAuth handler. I am also using the refresh token functionality.

The issue I face is that after the access_token has been refreshed, the oauth_expiry cookie appears to provide incorrect information (it still provides information relevant to the original access_token).

It's quite possible that I am doing something incorrect, and this is not in fact a bug. I had a quick look at the code to try and understand what was going on.

It appears that the oauth_expiry cookie is set in a single location inside the _on_auth function. It also appears that this function is not entered when handling a refresh_token. This suggests to me that this might actually be a bug ie the cookie is not updated. If I have misunderstood, I will try and share a MRE that should hopefully resolve the issue one way or another.

Complete, minimal, self-contained example code that reproduces the issue

Not included.

  • I may be interested in making a pull request to address this -> perhaps as simple as removing the early return?
@philippjfr philippjfr added this to the v1.4.1 milestone Apr 8, 2024
@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Apr 8, 2024
@philippjfr philippjfr modified the milestones: v1.4.1, v1.4.2 Apr 10, 2024
@philippjfr philippjfr modified the milestones: v1.4.2, v1.4.3 Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants