-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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-status ] Authentication Loop—Doesn't work anymore #15917
Comments
Thank you for opening this issue! 🔔 @PitNikola @johnhampton @thomaspaulmann @pernielsentikaer @ramsaysewell @henrik you might want to have a look. 💡 Author and Contributors commandsThe author and contributors of
|
CC @henrik |
Just getting on a plane but will look soon. @xmadscientist When you go through the auth flow, does Slack list dnd among the permissions? Basically the code tries to get DND status and if it fails due to missing permissions, it logs you out and when you log back in, that should be with the right permissions. |
This is what it's requesting, @henrik. |
Thanks! I tried the upgrade flow several times when writing it (having old permissions, running the extension, being logged out, logging back in) and never saw this issue 🤔 Would be interesting to hear if this is an isolated issue – is it working for others? Does Raycast show any error message (toast bottom left) when it happens? If so, can you expand it and tell me what it says? If you're willing to debug further, you could go to You could also go its "App details" tab, then "Configuration", then try revoking your authorization from there, and going through the flow again. If that doesn't help, does @pernielsentikaer have any suggestions on Raycast debugging practices? Could we make an update with a lot of sprinkled |
Nope! It doesn't show any error messages. In fact, it flashes the "Slack successfully connected" Raycast panel for a few frames before looping back to asking for authorization again. |
Thanks! This is the relevant code: extensions/extensions/slack-status/src/slack.ts Lines 22 to 50 in 1712079
The idea with the loop is to reattempt the DND lookup (whether you've paused notifications) after being logged out and re-authenticating, but it sounds like you're somehow authenticating, but then looking up the DND info fails with a "missing_scope" error, so it logs you out and on and on it goes. Just to rule it out, I now tried with a local production build ( Did revoking the permissions change anything? |
I have the same issue. I an authenticate correctly but when I come back it still thinks I don't have correct permissions. I can briefly see my previous / current custom statuses beneath but can't use them. Likely not useful but here's a log file: |
Unfortunately, revoking the permissions didn't help. :( |
@PitNikola @pernielsentikaer Can you confirm the extension works for you? |
The permissions screen has the message "Below are the default permissions configured for Raycast by the developer. Permissions installed might be different for each workspace." So one possible explanation might be that the workspace does not grant this permission, even though it's a default permission. I'm not sure how to test that theory, though. Can you see any indications that "dnd:read" is denied by the workspace? This is what my App details -> Configuration page looks like, but I'm not sure if it actually shows what the workspace allows. Does yours look any different, @xmadscientist? |
It worked as expected for me as expected without any issues |
@henrik If it helps any... 2024-12-19_10-56-38.mp4 |
I noticed that there are two different Raycast apps (one for the base app and one for the slack status thingy). Here are screenshots of what their app pages look like: |
Thanks so much for the additional detail! Regarding the "token_revoked" error mentioned by @thnk2wn, based on the line number I think this might be the If that's the case, then having the extension silently ignoring that error might help, though I can't say I fully understand what's going on. It succeeds getting the profile details, but then fails to get the DND details with "token_revoked". Perhaps there is still one unrevoked app/authentication without DND permissions, that succeeds in getting the profile; and there's also another app/authentication with DND permissions, that Raycast tries to use, but fails to because it's revoked on the Slack end? @xmadscientist Thank you. You cut off the name of the app in the second screenshot, but are you saying that there's an app in Slack that got DND permissions in December 2024 but that is not named "Slack Status"? And there's also the "Slack Status" app which does not have DND permissions, and that was authorised in June 2023? @pernielsentikaer Do you have context on how Raycast handles OAuth that might help understand this situation? Each extension using Slack should get its own access token, right? Two extensions using Slack with different permissions should be able to live side by side? |
@henrik I can't remember whether the error I posted was at load or when trying to change status but it appears the latter |
Thanks! My thinking so far is that I want to hear more from Raycast (e.g. Per) about how this is supposed to work – if there could be some kind of interference between Slack integrations, and if so, whether that's considered a bug. I also think I should add a text to the "Missing permissions" dialogue saying something to the effect of "If you keep seeing this message, please log out manually in the extension settings and uninstall all Raycast apps via Slack's admin UI". I appreciate that this is a frustrating situation, but I'm still not clear on precisely what's going on, so I can't reproduce it myself to fix it more gracefully than that. But it does seem to me like there is some leakiness to (my assumptions about) the OAuth abstractions that extensions lean on. It would be great if @thnk2wn and @xmadscientist could confirm whether doing those things fixes the issue. So specifically:
|
@henrik Thanks, that worked with the caveat that clicking the Logout button didn't actually clear the token, I had to wipe that out manually. I'm good with this workaround but going forward it should ideally handle upgrade paths when permissions change and that be included as part of testing |
This seemed to do it! Thanks so much! |
@thnk2wn Thank you! How did you wipe the token manually? I did try the upgrade path several times and spent a fair amount of time on it, but this seems to be some additional path of having multiple Raycast Slack apps that I still don’t understand well enough. Perhaps related to having both this extension and the other Slack extension? @xmadscientist Thank you for confirming! Happy holidays :) |
Extension
https://www.raycast.com/petr/slack-status
Raycast Version
1.88.3
macOS Version
14.7.1
Description
I keep getting put into an authentication loop.
And cannot actually set statuses anymore.
Steps To Reproduce
Confirm
button.Allow
Current Behaviour
N/A—outlined above.
Expected Behaviour
Get authenticated and start using slack-status from Raycast.
The text was updated successfully, but these errors were encountered: