Skip to content

Authentication

Advice for the young: don't touch anything related to authentication or app startup.

Because any tiny mistake is potentially thousands of people who will have login problems or in the worst case get logged out completely. Almost every project I've worked on had some sort of fuckup on this topic.

People actually do follow this advice, it's the classic "if it works, don't touch it". And that makes it even worse. Because almost always the authentication was written by that generation of developers who are no longer on the project, written in some dirty singleton way, expertise completely lost. And it's not like it works well either, which is why you're tempted to fix it. You gather information bit by bit from your gut feelings, and still don't account for all the scenarios.

The paradox is that this needs to be refactored and cleaned up almost as a priority. For the same reasons. It's potentially thousands of people for whom something will start working more stably, stop randomly kicking them out, or the app will start launching faster. In short, with great power comes great responsibility, yeah.

You need to test all this very, very thoroughly, and even the smallest bugs at first glance need to be taken seriously and go find the causes. Sad experience.