Skip to content

get token from callback_context#41

Merged
T4rk1n merged 5 commits into
mainfrom
fix/bg-token
Nov 11, 2024
Merged

get token from callback_context#41
T4rk1n merged 5 commits into
mainfrom
fix/bg-token

Conversation

@T4rk1n
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

ndrezn commented Nov 8, 2024

@T4rk1n is this good to merge?

@T4rk1n
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

T4rk1n commented Nov 11, 2024

Tested and working on de5

@T4rk1n T4rk1n merged commit b101307 into main Nov 11, 2024
@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