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.com
iscnbeining.com
,test@gmail.com
isgmail.com
. -
Fill in all environment variables required for OIDC integration. Remove
ALLOWED_DOMAIN
variable - 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
.name
is alwaysoidc
,domain
is the domain of your Email,enabled
istrue
,teamid
is the same as the original one. Note self hosted Outline can only have 1 team at a time. -
Go to table
teams
. Thename
is ALWAYS HARDCODED asWiki
.domain
is 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_authentications
table, create a second entry for users you want to associate: randomid
, sameuserId
, setauthenticationProviderId
,scopes
andproviderId
as 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.