In the olden days you were very much advised against integrating phpBB into your own login system since phpBB was a complex piece of software (still is, of course) and not very extensible, but the tides have changed since phpBB3 and they made it more extensible, so what are the options?
Authentication Plugin (for phpBB 3.0)
https://wiki.phpbb.com/Authentication_plugins
phpBB3 supports external authentication plugins that can be used to replace the traditional database-based user authentication which is still available as the db authentication method.
The plugins are implemented as dynamically loadable PHP modules in the includes/auth/
directory. Each module is identified by its method identifier. The identifier is used in the module name and it is a suffix of every function declared in the module.
To add a new authentication method (let’s call it foo
), you have to create the source file auth_method.php
(auth_foo.php
in our example) in the includes/auth/
directory. This source file should provide a number of functions. The only mandatory function in the authentication module is the login_method()
function (login_foo()
in our example). All other methods are optional.
As soon as the new authentication module has been created in the includes/auth/
directory, it can be selected as the desired authentication method in the Administration Control Panel under Client communication/Authentication settings.
I was unable to find a working example of this feature but with some programming knowledge you should be able to build your own.
Authentication Provider (for phpBB 3.1+)
https://area51.phpbb.com/docs/dev/3.1.x/extensions/tutorial_authentication.html#authentication-providers (with examples)
An authentication provider that comes with phpBB requires a minimum of two files: a class and an entry in phpBB/config/auth_providers.yml
file. Authentication providers that are part of an extension instead of requiring an entry in phpBB/config/auth_providers.yml
must provide their own yaml file defining the service in addition to all normal requirements of an extension.
The phpBB Wiki-entry on authentication providers comes with an example, so I recommend starting with that one if your board is on phpBB 3.1 or above.