I have several apps (~20) and I want to be able to log in with the same account in each of them; the apps belong to the same Apple Developer account.
When the user creates an account within one of the apps, this allows access to the apps and has the content synced across them (it creates some sort of organization account). The account can be then shared across them.
This flow already works with a custom-implemented email+password authentication and Facebook login method, but now I need to introduce Sign in with Apple and I'm encountering some issues.
When trying to add multiple apps under the same app in App Store Connect, I get the following error:
Maximum number of apps have been associated with this primary app. Max limit: '5'
How can I group all ~20 apps together so that I can recognize the same user logging in from different apps?
From your question, I think the limitation on the linked apps set by Apple cannot be changed. But I would recommend you to send an email to Apple's developer support team to ask whether they allow 20 apps to share same account information instead of current 5 maximum.
Besides that, this is what I think about: I'm not sure about your apps. I know some apps will allow users to change their usernames. If you are in this case, you can change that from username to nickname, and assign a new username(could be the old nickname for old users or their e-mail address). And make username unchanged. From what I know, when a user is using Sign-in with Apple, you can ask them to input some information. In this case, you can ask them to input a username which will later become the universal username in other apps. This is the solution I currently think about.