Skip to content

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

Merged
seratch merged 1 commit into
slackapi:mainfrom
seratch:issue-584-user-token-retrieval
Feb 1, 2022
Merged

seratch merged 1 commit into
slackapi:mainfrom
seratch:issue-584-user-token-retrieval

Conversation

@seratch

@seratch seratch commented Feb 1, 2022

Copy link
Copy Markdown
Contributor

This pull request resolves #584

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements (place an x in each [ ])

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

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

@seratch seratch added bug Something isn't working area:async area:sync labels Feb 1, 2022
@seratch seratch added this to the 1.11.4 milestone Feb 1, 2022
@seratch seratch self-assigned this Feb 1, 2022
@codecov

codecov Bot commented Feb 1, 2022

Copy link
Copy Markdown

Codecov Report

Merging #586 (9b2f9c7) into main (b4dab2c) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #586      +/-   ##
==========================================
+ Coverage   91.49%   91.53%   +0.04%     
==========================================
  Files         169      169              
  Lines        5701     5707       +6     
==========================================
+ Hits         5216     5224       +8     
+ Misses        485      483       -2     
Impacted Files Coverage Δ
slack_bolt/authorization/async_authorize.py 85.00% <100.00%> (+1.05%) ⬆️
slack_bolt/authorization/authorize.py 84.78% <100.00%> (+1.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4dab2c...9b2f9c7. Read the comment docs.

context = BoltContext()
context["client"] = WebClient(base_url=self.mock_api_server_base_url)
result = authorize(
context=context, enterprise_id="E111", team_id="T0G9PQBBK", user_id="W333"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The installation store does not return tokens for user ID "W333"

assert result.bot_id == "BZYBOTHED"
assert result.bot_user_id == "W23456789"
assert result.bot_token == "xoxb-valid"
assert result.user_token is None

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Before the change in this PR, this is not absent.

assert result.bot_id == "BZYBOTHED"
assert result.bot_user_id == "W23456789"
assert result.bot_token == "xoxb-valid-refreshed"
assert result.user_token is None

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

same here

@seratch
seratch merged commit 7fa4e88 into slackapi:main Feb 1, 2022
@seratch
seratch deleted the issue-584-user-token-retrieval branch February 1, 2022 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:async area:sync bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant