Help

Integration

Apache Answer OAuth2 Integration

Updated 15 Nov 2026 7 min read

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.

  1. Creating an application on Monosign

  2. Configuring the OIDC/OpenID settings on Monosign

  3. Assign a user to the Apache Answer application

  4. Configuration Single Sign-On for Apache Answer

  5. 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.

image-20261030-191725.png

Apache Answer is not in the application catalog, so click Create from scratch.

image-20261030-191750.png

Fill in the application details on the Application tab and click Next.

image-20261112-102400.png

Property

Value

Description

Name

Apache Answer

Name of the application shown to users on the Monosign portal and on the Monosign sign-in page.

Type

Web

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 https://<answer-address>).

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

Enabled

Displays the application on the user portal.

On the Access tab define who can reach the application and click Create Application.

image-20261030-192040.png

Property

Value

Description

User Access Type

System Default

Defines which users can access this application. Options: Only Assigned Users, All Users, System Default.

User Group Access Type

System Default

Defines the application’s user group access.

Source Using Type

System Default

Defines which user sources the application can use.

Profile Access Type

All

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.

image-20261030-192203.png

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.

image-20261018-104856.png

Configuration details for the Apache Answer application are provided as follows:

image-20261112-102454.png

Monosign value

Example

Used in Apache Answer as

Client Id

<client-id>

ClientID

Client Secret

<client-secret>

ClientSecret

Auth Url

https://<monosign-host>/openid/authorize

Authorize URL

Access Token Url

https://<monosign-host>/openid/token

Token URL

User Info Url

https://<monosign-host>/openid/userinfo

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.

image-20261031-211438.png

Add the callback address of Apache Answer to Allowed Redirect URIs, enter the scopes in the Scope field, then press Update.

image-20261112-102727.png

Property

Value

Description

Allowed Redirect URIs

https://<answer-address>/answer/api/v1/connector/redirect/basic

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

openid profile email

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.

image-20261030-193315.png

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.

image-20261030-193652.png

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.

image-20261112-104350.png

Field

Value

Description

Name

Monosign

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

https://<monosign-host>/openid/authorize

The Auth Url of the Monosign key.

Token URL

https://<monosign-host>/openid/token

The Access Token Url of the Monosign key.

User JSON URL

https://<monosign-host>/openid/userinfo

The User Info Url of the Monosign key.

User ID JSON Path

sub

Field of the user information that identifies the user.

User Display Name JSON Path

name

Display name of the user.

User Username JSON Path

preferred_username

User name of the user.

User Email JSON Path

email

E-mail address of the user.

Check Email Verified

false

If it is off, the e-mail address is always accepted as verified.

Scope

openid,profile,email

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.

image-20261112-110809.png
  1. Click the Monosign button once.

  2. 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.

  3. 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.

image-20261112-110115.png

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 --with github.com/apache/answer-plugins/connector-basic (see the beginning of this document).

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 http://.

Use https://<answer-address>/answer/api/v1/connector/redirect/basic (step 2) and set the Site URL.

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.

Permanent link