Skip to content
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

Add asyncio support to SQLAlchemy based InstallationStore/StateStore #1276

Open
1 of 9 tasks
melvinkcx opened this issue Oct 14, 2022 · 2 comments
Open
1 of 9 tasks
Labels
enhancement M-T: A feature request for new functionality oauth Version: 3x
Milestone

Comments

@melvinkcx
Copy link

Hi, I'm trying to use AsyncOAuthSettings with SQLAlchemyOAuthStateStore. However, I stumbled upon this error and found out that SQLAlchemyOAuthStateStore doesn't support async operations:

  File "/usr/local/lib/python3.10/site-packages/slack_bolt/oauth/async_oauth_flow.py", line 167, in handle_installation
    state = await self.issue_new_state(request)
  File "/usr/local/lib/python3.10/site-packages/slack_bolt/oauth/async_oauth_flow.py", line 194, in issue_new_state
    return await self.settings.state_store.async_issue()
AttributeError: 'SQLAlchemyOAuthStateStore' object has no attribute 'async_issue'

I wonder if there are any plans to support this in near future?

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

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.models (UI component builders)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.rtm (RTM client)
  • slack_sdk.signature (Request Signature Verifier)

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.

@seratch seratch added enhancement M-T: A feature request for new functionality Version: 3x oauth and removed untriaged labels Oct 14, 2022
@seratch seratch added this to the 3.x milestone Oct 14, 2022
@seratch
Copy link
Member

seratch commented Oct 14, 2022

Hi @melvinkcx, thanks for writing in!

This sounds a great addition in the future! However, since the asyncio support in SQLAlchemy is still in beta, we are not planning to add asyncio support in the short term. Once the built-in asyncio support in SQLAlchemy is GAed, we are happy to add the support on this SDK side.

For now, you may want to reuse the example code here. If you are fine to use databases, which is a different library relying on SQLAlchemy, the implementation should work well for you.

@seratch seratch changed the title Consider adding async support for SQLAlchemyOAuthStateStore Add asyncio support to SQLAlchemy based InstallationStore/StateStore Oct 14, 2022
@KeiichiHirobe
Copy link

Hi @seratch
It seems that built-in asyncio support in SQLAlchemy has reached GA status in version 2.0.

I noticed that you still support 1.4.3, so you might not support asyncio in this SDK yet. However, it would be greatly appreciated if you could add support for it when you stop supporting 1.4.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality oauth Version: 3x
Projects
None yet
Development

No branches or pull requests

3 participants