Skip to content

Wrong user_token assigned to new user (affected versions: v1.11.2, v1.11.3) #584

Description

@stantonius

After updating to v1.11.3 I was experiencing that the user token was not being reassigned to None if the requesting user has not yet had an installation. This fix was part of issue #576.

What happens now is if a user does not currently have an installation, the App assumes it was the latest user and assigns it their user_token.

I have created a simple PR to fix this, however I am no longer sure #576 actually fixed my initial issue #574. I could be missing something though.

Reproducible in:

The slack_bolt version

git+git@github.com:stantonius/bolt-python.git@805e976#egg=slack_bolt

Python runtime version

Python 3.9.2

OS info

ProductName: macOS
ProductVersion: 12.0.1
BuildVersion: 21A559
Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101

Steps to reproduce:

As described in #574 and fix #576:

  1. The App is assigned at the organization level. A bot_token is generated and stored
  2. One user looks at the app, understands what it does, and then installs user permissions, generating and storing a user_token
  3. A second user does the same as the first. The app recognizes it is a new user, and asks for user permissions again

Expected result:

No user_token for second user. App asks for this to be generated via Oauth flow

Actual result:

The previous user's user_token is assigned to this second user.

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Activity

  1. changed the title [-]Wrong user_token assigned to new user[/-] [+]Wrong user_token assigned to new user (affected versions: v1.11.2, v1.11.3)[/+] on Jan 31, 2022
  2. added this to the 1.11.4 milestone on Jan 31, 2022
  3. self-assigned this
    on Jan 31, 2022
  4. added a commit that references this issue on Feb 1, 2022
    7fa4e88
  5. seratch commented on Feb 1, 2022

    @seratch
    Contributor

    @stantonius Thanks again for reporting this issue! We've released a new patch version including the fix for this issue. Please try the latest version out 👋

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions