There's a problem that Slack login is required for Slack integration, but sometimes we want to use OIDC for login: this will make the application vomit.
Steps to fix it:
Get a Postgres connector, connect to DB. Backup DB.
Consider the Email domain you will use with OIDC:
blah [at] cnbeining.comiscnbeining.com,test@gmail.comisgmail.com.Fill in all environment variables required for OIDC integration. Remove
ALLOWED_DOMAINvariable - otherwise Outline will not allow logins from Email whose domain is different from it's own domain.Create a new entry in table
authentication_providers.nameis alwaysoidc,domainis the domain of your Email,enabledistrue,teamidis the same as the original one. Note self hosted Outline can only have 1 team at a time.Go to table
teams. Thenameis ALWAYS HARDCODED asWiki.domainis empty. Failing to do so will cause Outline to complain "max number of teams reached".Now your new OIDC should be working but users is not be associated across authentication providers by Email.
In
user_authenticationstable, create a second entry for users you want to associate: randomid, sameuserId, setauthenticationProviderId,scopesandproviderIdas the new one's. Delete the newly created but disassociated user.Now you should have more than 1 login method with users associated across the board by Email.