Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simultaneously "Add to Slack" and "Sign in with Slack"

I'm working on a Slack app that also links with a web app, which users can log into using Slack. It's very common for a new user to need to both log into the web app and add the app to Slack.

I'd like to let them do this with a single trip through OAuth. Since the web app needs a name, email address, and profile picture for each user, I added the "identity.basic", "identity.email", etc. scopes to the ones requested by the "Add to Slack" button. But it turns out that Slack doesn't allow this. The Slack OAuth page says "Invalid permissions requested: Cannot request both identity scopes and other scopes at the same time".

One alternative might be to request the users:read and users:read.email scopes instead of the identity scopes. But this gives our app more access than it needs; it just needs the info for the current user, not for all users on the team. (It might later need that info for all users, so I'm considering doing this anyway, but I'm not sure if users would like it.)

The other alternative seems to be to make the user go through two different OAuth permissions screens. But this seems cumbersome and not a good user experience.

So the questions are (1) is there a better way, and (2) why doesn't Slack allow combining the identity scopes with others?

UPDATE to clarify, in response to the answer from @erik-kalkoken:

I'm aware of the differences between "Add to Slack" and "Sign In with Slack". I certainly don't intend to take away the option for most users to do a simple "Sign In with Slack". However, with this particular app, it makes no sense to do "Add to Slack" without also being signed in to the web app. This needs to be done by one person per Slack team before other users on that team can use it. Our onboarding process for new teams is a bit cumbersome, and I'm looking for ways to make it simpler and smoother. Since the sign-in and add steps could theoretically be combined into one step, I would prefer to do that.

Part of this may be because we aren't developing a "Slack app"; we're developing a Slack integration for a web app. The web app can be used without using Slack, and has its own concepts of users and communities.

like image 898
aldel Avatar asked Apr 08 '17 21:04

aldel


People also ask

Can you be logged into two accounts on Slack?

Yep! You can log into multiple accounts with the desktop/mobile apps. Are you logged in on your web browser after accepting the invite? Click the workspace name in the top-left to open the menu -> "Open the Slack app" to add to your desktop app.

Can I use Slack with two different emails?

You can use the same email address to join or create multiple workspaces, but your account for each workspace is separate. To change your email address for another Slack workspace, sign in and repeat the same steps above.


1 Answers

The "better way" in my opinion would be to not combine these two functions on your website, because their effect is very different. I would argue that it would be confusing to users if they are combined and would not make a good user experience.

"Add to Slack" is installing a Slack app for the whole Slack team. You only do this once and its usually done by the admin of a Slack team.

"Sign in with Slack" is used to authenticate any user of a Slack team. You would use this function every time you log into your app and its used by many users of a Slack team.

like image 85
Erik Kalkoken Avatar answered Sep 27 '22 16:09

Erik Kalkoken