Skip to content

get token from callback_context #41

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

Merged
merged 5 commits into from
Nov 11, 2024
Merged

get token from callback_context #41

merged 5 commits into from
Nov 11, 2024

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Oct 22, 2024

Take the token from the callback_context added in plotly/dash#3051
Fix get_username called inside a background callback.

@T4rk1n T4rk1n requested a review from michaelbabyn October 22, 2024 20:34
Copy link
Contributor

@michaelbabyn michaelbabyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me 💃

@T4rk1n
Copy link
Contributor Author

T4rk1n commented Oct 23, 2024

I changed to have the token from the request cookies first since this is also called from other routes. Also moved the flask context check to allow the function to be called from celery. Fix https://github.com/plotly/dekn/issues/8953

@michaelbabyn Can you have a look again? Thank you.

Copy link
Contributor

@michaelbabyn michaelbabyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works after the change to dash that I mentioned in plotly/dash#3051 💃

@ndrezn
Copy link
Member

ndrezn commented Nov 8, 2024

@T4rk1n is this good to merge?

@T4rk1n
Copy link
Contributor Author

T4rk1n commented Nov 11, 2024

@T4rk1n is this good to merge?

Yes, just need to test it works with the latest dash version.

@T4rk1n
Copy link
Contributor Author

T4rk1n commented Nov 11, 2024

Tested and working on de5

@T4rk1n T4rk1n merged commit b101307 into main Nov 11, 2024
1 check passed
@T4rk1n T4rk1n deleted the fix/bg-token branch November 11, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants