Slack Mobile Problems After Enabling 2FA
Two Factor Authentication (2FA) is an important part of ensuring account security. This typically involves linking your account to a mobile authenticator app, and after logging in via a normal username and password, adding a time-limited code from the app. It's increasingly-common to see online services require this secondary level of security, particularly from users with admin access or heightened privileges in an app.
Slack have offered this feature for a while, and recently announced a mandate for all admin users to have this in place before the end of February 2024. However, after enabling this on my account, a fun bug occurred - the mobile app signed me out of my workspace, and refused to re-add me. Fixing this involved jumping through a few hoops, documented below.
Logged out
After enabling 2FA on the desktop, when I opened the app I noticed I was signed out of my Square1 workspace. Fair enough - adding 2FA usually involves a re-authentication, so this pattern makes sense. Within Slack, I go to my workspaces list, and see my Square1 one there. Slack still recognises that I'm a member of this workspace, so I press "Add" to presumably authenticate again.
Problem. Pressing "Add" causes a "Sorry, something went wrong, please try again" error. Restarting the app and even restarting the phone made no difference - it looks like there's some weird state my account was in where Slack wouldn't even attempt to add the workspace. During this time, my desktop login was still fine, it's just the mobile device where it wouldn't work. Probably a good thing for my work-life balance and desire for a quiet life! But something to get fixed all the same.
The Fix
The workaround is a little non-obvious, with a few hoops to jump through.
First, go to the workspaces list, and click the "i" beside your email address. This will show that your email address has been verified on this device. Click "Revoke email confirmation".
After that is done, in the same workspace view, you'll see a prompt to verify your email address. Click it, and an email will arrive in a matter of moments.
Clicking that link will re-open the app, showing a list of the workspaces you have available to add. Something about this process seems to reset the slack authentication state, so now when I click the Square1 workspace, I get prompted to authenticate, using my 2FA app.
Once I enter the auth code, I'm back in, and all is well. Whatever weird login state I got stuck in is resolved, and normal service is resumed!
International PHP Conference
Munich, November 2024
In November 2024, I'll be giving a talk at the International PHP Conference in Munich, Germany. I'll be talking about the page speed quick wins available for backend developers, along with the challenges of policing dangerous drivers, the impact of TV graphics on web design, and the times when it might be better to send your dev team snowboarding for 6 months instead of writing code!
Get your ticket now and I'll see you there!