Flarum
Using OAuth2 to connect various applications, like Flarum
Hanzo IAM can use OAuth2 to connect various applications. In this example, we will show you how to use OAuth2 to connect Flarum to your applications.
Note these variables:
IAM_HOSTNAME: The domain name or IP where the Hanzo IAM server is deployed.
Flarum_HOSTNAME: The domain name or IP where Flarum is deployed.
Step 1: Deploy Hanzo IAM and Flarum
After a successful deployment, make sure:
- You have downloaded the Flarum plugin FoF Passport.
- Hanzo IAM can be logged in and used normally.
- For local
prodmode, set IAM_HOSTNAME =http://localhost:8000. See production mode.
Step 2: Configure Hanzo IAM application
- Create a new Hanzo IAM application or use an existing one.
- Find the redirect URL:
<IAM_HOSTNAME>/auth/passport. - Add the redirect URL to the Hanzo IAM application:

Note Client ID and Client secret for the next step.
Open http://IAM_HOSTNAME/.well-known/openid-configuration in a browser to view Hanzo IAM's OIDC configuration.
Step 3: Configure Flarum
- Install the plugin FoF Passport.
- Configure the app:

- Find the Client ID and Client Secret in the Hanzo IAM application page.
Token server URL: http://IAM_HOSTNAME/oauth/tokenAuthorization server URL: http://IAM_HOSTNAME/oauth/authorizeUserInfo server URL: http://IAM_HOSTNAME/api/get-accountScopes:address phone openid profile offline_access email
Log out of Flarum and test SSO.

How is this guide?
Last updated on