Creating a new Auth Provider

I’ve just deployed Phabricator – now I need to connect to my companies existing SSO/oAuth2 solution.

My first attempt was to just create classes in applications/auth/adapter and provider – but those classes don’t appear yet in the selections – PhabricatorAuthProvider::getAllBaseProviders() doesn’t load them (I’m not sure why).

I think my first issue is, how do I get them to show up in the choice list?

My second issues, discovering the correct place to put my add-ons/extension.

The third issue, which I suppose I could handle if #1 was fixed, was to code the provider (I’ve done this before).


I’ll answer myself…

Check out src/applications/auth/adapter and src/applications/auth/provider I just found two that I liked (Slack) and then copied those files into src/extensions – then changed the file and class names, so that instead of “Slack” it showed “MyCustom” – now the UI shows this provider option with some configuration options for Client and Secret, etc… – if your oAuth2 Server bits are OK, this will work – if your oAuth2 is odd/unique then examine the other Adapters and Providers to see what trick you’ve got to sort out.

I think will answer question 1…