We have introduced an oAuth2-Server for my client.
This server supports a variety of clients, one of which is the new web-app that we developed. We had specifically developed the auth-server for use in the new web-app (and future apps).
But since the auth-server is really great, we decided to add support in classic web-app as well, so we did that.
The question now is which one (the classic or the new web-app) should be the default after the login if the users just use a URL like .com/login (the existing login-URL)?
Ok, of course, the decision is "new web-app". So far, so good.
There is, though, a situation where, after the login, in the new web-app we realize that this use can (for various reasons) only use the classic web-app, so we then redirect the user to the classic web-app code. So far, so good as well.
The thing is, currently, in order to detect that situation, the new web-app is loaded into the user's browser, then thrown out and the classic code is loaded, which can take up to 1-2 seconds.
The dev's suggestion was: "Let's move some of that code from the new web-app to the oAuth2-Server and the auth-server should decide where to send the user."
Me: "Are you f**** crazy? Move app-functionality to oAauth2-Server? How many times do I have to tell you that we ain't gonna add any app-functionality into the oAuth2-Server? It is a friggin' auth-server, its sole job is to authenticate a user, nothing more, noting less... No, we are not going to do that!"
Them: "But how are we going to solve this problem then?"
Me: "Umm, maybe splitting that code in the web-app into a smaller chunk, sending the user to that small chunk which just checks for that criteria and then either loads the bigger, main chunk or classic...?"
Them: "Ooof, but then we have to restructure our code a lot."
Me: "Well, who told you that software engineering was easy? Yes, that's exactly what we have to do and that's exactly what we will do!"
Them: "..."
Me: "And btw, we will do a lot more restructuring after next week's big launch, because I can't accept chunk-sizes of 5MB!"
Them: "... ooof ..."
(Note: I wasn't as rude as I write here, but this is what I felt and wanted to say, but I said most of it in a nicer tone)
#WorkTopics