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

Slack needs 2 providers #3788

Closed
tlpriest opened this issue May 8, 2024 · 3 comments
Closed

Slack needs 2 providers #3788

tlpriest opened this issue May 8, 2024 · 3 comments

Comments

@tlpriest
Copy link

tlpriest commented May 8, 2024

This change 9c692c2 moved slack from OAuth to OpenID, breaking existing integrations. While it is true that Slack now supports OpenID for authentication, it also still uses OAuth for authorization.

I think there needs to be 2 django-allauth slack integrations: one for Sign into this website with your slack account (OpenID), and another for install this application into your slack workspace (OAuth 2.0).

We're going to have to revert our version of django-allauth to the version prior to this change until we can rework things. But the move of the existing provider is likely going to break almost all existing django-allauth integrations using slack if they're doing anything other than simple login.

@pennersr
Copy link
Owner

pennersr commented May 8, 2024

I am wondering if the 2nd flow ("install this app into your slack workspace") makes sense in an allauth context, e.g.:

  • When you add an app to the Slack workspace, it would also be presented as a way of signing in (in the 3rd-party provider accounts overview). That is actually an odd side effect, not?
  • In order to get this flow going, allauth needs user information, and hence the identity scope, whereas your app may not even need that scope.
  • If the user disconnects the 3rd-party provider account via the connections page, the app would still remain connected.

All in all, the above is a sign on the wall that things are being used for a purpose for which it was not intended. How do you deal with these issues?

@joonhyungshin
Copy link
Contributor

I don't think allauth should handle the 2nd flow. The first flow is intended to allow users to login to a service using Slack credentials, for which allauth kicks in. On the other hand, the second one allows the service to act within a Slack workspace, and the user who initiates the flow (typically the admin of the workspace) is simply a delegate.

It is technically possible for allauth to handle the flow so that the entire workspace is registered as a Django user, but it is not a typical OAuth authentication and will overcomplicate stuffs to implement something that allauth is not indended to handle. I would suggest using the official Slack SDK for your use case.

@pennersr
Copy link
Owner

Closing for above mentioned reasons.

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

No branches or pull requests

3 participants