You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the awesome package! I've been using it in a personal project, but I'm unsure of how to access the current users Slack information in the SLACK_SUCCESS_REDIRECT_URL. While it is being stored in the database, getting the "most recently created access token" after redirection seems to introduce all sorts of race conditions. When checking request.user in the redirected view, all it displays is AnonymousUser. I assumed any information set on the request object would be available, but it looks like creating a new HttpResponseRedirect (views.py#L117) also creates a new request object, wiping any information stored on it from your pipelines. What's your recommended solution to this problem?
Thanks!
The text was updated successfully, but these errors were encountered:
Would still love a response, but here's how I solved in in the meantime: I created a custom SlackUser object with a session attribute, and as the first part of my pipeline I get_or_create a new SlackUser then update the session attribute using request.COOKIES['session']. After redirecting to SLACK_SUCCESS_REDIRECT_URL, I get the SlackUser with the same session!
Hi @izdi,
Thanks for the awesome package! I've been using it in a personal project, but I'm unsure of how to access the current users Slack information in the SLACK_SUCCESS_REDIRECT_URL. While it is being stored in the database, getting the "most recently created access token" after redirection seems to introduce all sorts of race conditions. When checking
request.user
in the redirected view, all it displays isAnonymousUser
. I assumed any information set on therequest
object would be available, but it looks like creating a new HttpResponseRedirect (views.py#L117) also creates a newrequest
object, wiping any information stored on it from your pipelines. What's your recommended solution to this problem?Thanks!
The text was updated successfully, but these errors were encountered: