New auth method: Sign in on mobile
Is your feature request related to a problem? Please describe.
Another easy way to get auth'ed is to use a Sign in on mobile feature of the already logged in Slack workspace.
Describe the solution you'd like
In Slack, click the Workspace name, then chose "Sign in on mobile". This provides a QR code that can be used for sign-in.
You can right click the QR code and choose "Copy image URL".
The URL is a Base64 encoded string:
data:image/png;base64,iVBORw....
This makes it extremely easy to share (copy and paste) into the CLI wizard.
QR Code contains the URL in the following format:
https://app.slack.com/t/${WORKSPACE_NAME}/login/z-app-${SOME_ID}-${SOME_OTHER_NUM}-${SOME_LONG_STRING}?src=qr_code&user_id=U...&team_id=T...
Visiting this URL will do a redirect and then Slack workspace magically opens. 🎉
Describe alternatives you've considered
N/A
Additional context
Then:
Hey @moltar , that's neat! Thanks for the thorough description — I'll have a stab at this.
@moltar I'm playing around with this, and the decoded URL doesn't seem to work anymore. My steps are:
- Get the QR code from logged in Slack Client
- Decode it into the URL
- Visit URL in the private window
- Get the "Couldn't sign in" page (below) (title says: Link expired)
Am I doing something wrong? Could you please verify if this still works for you too?
UPD: It does start the process when I'm trying to open it through the QR code scanner on my phone tho (starts the "enter code on a new browser" flow)
UPD: Found out that the problem was in the QR library I used (https://github.com/liyue201/goqr). It mangled triplets of digits in the ${SOME_ID} parts of the token.
Hm, still works for me!
Released in v3.1.11!
Usage:
sd workspace new
or
Main Menu -> Workspace -> New -> Login In Browser
Then enter workspace name, and choose "QR Code"