This document explains how to implement Monosign with Apache Answer, the open source question and answer platform. It covers Single Sign-On with OAuth 2.0, which is provided by the official plugin OAuth2 Basic Connector (connector-basic). The plugin uses the Authorization Code flow and reads the user from the user information endpoint, so the OIDC/OpenID access key of Monosign is used. Before you continue, it is better to read the Apache Answer plugin documentation (opens in a new tab).
This configuration was tested with Apache Answer 2.0.3 and the plugin connector-basic. If your version is different, please check the Apache Answer documentation.
The plugin is configured in the Apache Answer admin interface under Admin → Plugins. SAML is not available.
Monofor has no responsibility to do Apache Answer configurations. If you need support please contact the Apache Answer community or your Apache Answer support provider.
The plugin must be built into Apache Answer. Plugins are not installed from the interface; they are added to the Apache Answer binary when it is built: ./answer build --with github.com/apache/answer-plugins/connector-basic. The official Docker image does not contain the plugin, so a custom image has to be built (see the Apache Answer documentation, Plugins → Docker Build). Without it the OAuth2 Basic Connector is not in the plugin list.
Instructions
This documentation contains 5 main steps for integration.
Creating an application on Monosign
Configuring the OIDC/OpenID settings on Monosign
Assign a user to the Apache Answer application
Configuration Single Sign-On for Apache Answer
Sign In Test
1- Creating an Application on Monosign
Create your application on Monosign first. Open the Applications page from the left menu and click Add New.
Apache Answer is not in the application catalog, so click Create from scratch.
Fill in the application details on the Application tab and click Next.
Property | Value | Description |
|---|---|---|
Name |
| Name of the application shown to users on the Monosign portal and on the Monosign sign-in page. |
Type |
| Apache Answer is accessed through a web browser. Options: Web, Mobile, Desktop, API. |
Url | Optional | Leave empty or enter the address of Apache Answer (for example |
Logo | Optional | Browse and upload a logo; it is also shown on the Monosign sign-in page. |
Users can see this application on their list |
| Displays the application on the user portal. |
On the Access tab define who can reach the application and click Create Application.
Property | Value | Description |
|---|---|---|
User Access Type |
| Defines which users can access this application. Options: Only Assigned Users, All Users, System Default. |
User Group Access Type |
| Defines the application’s user group access. |
Source Using Type |
| Defines which user sources the application can use. |
Profile Access Type |
| Defines which user profile attributes are available to the application (Options: Restricted, All). Apache Answer needs the e-mail address, the name and the user name of the user. |
After the application is created, click Keys and add a new Access Key for OIDC/OpenID access.
Select OIDC/OpenID as the key type and click Create. Monosign generates the Client Id and Client Secret automatically. Apache Answer consumes the key with OAuth 2.0 and does not read the discovery document, so every address is entered one by one.
Configuration details for the Apache Answer application are provided as follows:
Monosign value | Example | Used in Apache Answer as |
|---|---|---|
Client Id |
| ClientID |
Client Secret |
| ClientSecret |
Auth Url |
| Authorize URL |
Access Token Url |
| Token URL |
User Info Url |
| User JSON URL |
2- Configuring the OIDC/OpenID Settings on Monosign
Open the Keys tab of the application and click the Configure button of the OpenID Connect (OIDC) key to open the OIDC/OpenID settings.
Add the callback address of Apache Answer to Allowed Redirect URIs, enter the scopes in the Scope field, then press Update.
Property | Value | Description |
|---|---|---|
Allowed Redirect URIs |
| The address where Monosign sends the user back after sign-in. Use the public (HTTPS) address of Apache Answer, exactly as it is written here. |
Scope |
| Enter the three scopes one by one. |
Other fields | Empty / default | The other fields (Issuer, Audience, Resource, token lifetimes, CORS) are not needed. |
3- Assign a User to the Apache Answer Application
Open the application in Monosign, click the Assignments tab and click Assign a User.
Search and select the users who can sign in to Apache Answer, check the Expiration Date and save. You can select more than one user. Every user needs an e-mail address, a name and a user name in Monosign.
4- Configuration Single Sign-On for Apache Answer
As we mentioned at the start, please check out the Apache Answer documentation first. Log in to Apache Answer with an administrator account, open Admin → Plugins, click OAuth2 Basic Connector, fill in the fields below and click Save.
Field | Value | Description |
|---|---|---|
Name |
| Name of the connector that is shown on the login page. |
ClientID and ClientSecret | Client Id and Client Secret | Copied from the Monosign OIDC/OpenID Access Key Details created in the first step. |
Authorize URL |
| The Auth Url of the Monosign key. |
Token URL |
| The Access Token Url of the Monosign key. |
User JSON URL |
| The User Info Url of the Monosign key. |
User ID JSON Path |
| Field of the user information that identifies the user. |
User Display Name JSON Path |
| Display name of the user. |
User Username JSON Path |
| User name of the user. |
User Email JSON Path |
| E-mail address of the user. |
Check Email Verified |
| If it is off, the e-mail address is always accepted as verified. |
Scope |
| Scopes that Apache Answer requests, separated by commas; they must be the same as in step 2. |
Apache Answer creates a user account at the first sign-in with the user name, the display name and the e-mail address from Monosign. If an account with the same e-mail address exists, the Monosign user is linked to it. When Apache Answer is behind a reverse proxy, the proxy must send X-Forwarded-Proto: https and the Site URL in the Apache Answer settings must be the public HTTPS address.
5- Sign In Test
Now try to log in to Apache Answer using Monosign SSO. Open a new browser window (or a private window) and type the address of Apache Answer. On the login page click the Monosign connector.
Click the Monosign button once.
On the Monosign sign-in page log in passwordless with your QR code (Monofor Identity), with a Passkey or with your user name and password (Sign in with Password). If you are already signed in to Monosign, the page is skipped.
After the sign-in Monosign redirects the browser back to Apache Answer (
/answer/api/v1/connector/redirect/basic) and the user is signed in to Apache Answer.
Troubleshooting
Symptom | Cause | Solution |
|---|---|---|
The OAuth2 Basic Connector is not in the plugin list | The plugin was not built into Apache Answer. | Build Apache Answer with |
The Monosign button is not shown on the login page | The connector is not enabled or the settings were not saved. | Check step 4 and save the settings again. |
Monosign shows a redirect URI error | The callback address does not exactly match the Allowed Redirect URIs, for example because the Site URL of Apache Answer is different or starts with | Use |
An error appears after returning from Monosign | The Client Id or Client Secret is wrong, or Apache Answer cannot reach Monosign. | Copy the values again from the Monosign access key (step 1) and check that the Monosign addresses open from the Apache Answer server. |
A user cannot sign in | The user is not assigned to the application. | Assign the user in step 3. |
After completing the configuration on Apache Answer and Monosign, it is better to test in a new private browser window if the OAuth 2.0 SSO doesn’t work, because old session cookies may cause errors.
The OAuth2 connector settings in the Apache Answer administration interface are prefilled with example JSON paths from the plugin README (for example user.id). Replace them with the claims that Monosign returns, otherwise the sign-in fails with Access denied and a message about a unique UserID: User ID JSON path = sub, Display name JSON path = name, Username JSON path = preferred_username, Email JSON path = email.













