Setting Up Duo Sign-In (OIDC)

This guide shows how to let users sign in to GlobalForms through Duo Single Sign-On, using OpenID Connect (OIDC). Users sign in with their existing directory credentials and complete Duo two-factor authentication before reaching GlobalForms.

This feature requires GlobalForms version 10.17.1 or greater.

Before you begin

You will need:

  • An account with the Owner or Administrator role in the Duo Admin Panel.

  • Duo Single Sign-On already set up, with an authentication source (such as Active Directory or a SAML identity provider) that provides each user's email address. See Duo's documentation for Duo Single Sign-On.

  • The public HTTPS address of your GlobalForms server, for example https://forms.example.com. See Configuring HTTPS.

  • Access to config\local.json on the GlobalForms server, and permission to restart the GlobalForms service.

  • A GlobalForms user resource whose records contain each user's email address. Duo can only sign in people who already have a matching GlobalForms user record.

Use the Generic OIDC Relying Party application described on this page. Duo's other application types, such as Web SDK, don't work with GlobalForms single sign-on.

Part 1: Add GlobalForms to Duo

1. Create the application

  1. Sign in to the Duo Admin Panel and go to Applications → Protect an Application.

  2. Search for Generic OIDC Relying Party and select Protect.

2. Configure the relying party

On the application's page, under Relying Party:

Setting

Value

Sign-In Redirect URLs

Your GlobalForms callback address, for example https://forms.example.com/oidc/callback

Scopes

Turn on profile and email. (openid is always included.)

Email claim

Under the email scope, map the email claim to the <Email Address> attribute from your authentication source.

Grant types

Authorization Code

The sign-in redirect URL must exactly match redirectUrl in the GlobalForms configuration (Part 2), including https, host name, port and path.

3. Name the application and choose who can use it

  1. Under Settings, enter a Name such as GlobalForms. Users see this name in the Duo Prompt.

  2. Under User access, choose the groups that may use GlobalForms (recommended), or allow access to all users.

  3. Assign a policy if GlobalForms needs different two-factor rules from your global policy.

  4. Select Save.

4. Record your credentials

In the application's Metadata section, copy:

  • Client ID

  • Client Secret. Treat it like a password: don't email it or store it in shared documents.

  • Issuer. It looks like https://sso-<id>.sso.duosecurity.com/oidc/<client ID>.

Part 2: Configure GlobalForms

  1. Open config\local.json in the GlobalForms install folder (C:\GlobalForms by default).

  2. Add or update the oidc section, replacing the placeholders with your values:

    JSON
    "oidc": {
      "issuer": "<Issuer from the Duo Metadata section>",
      "clientId": "<Client ID from Duo>",
      "clientSecret": "<Client Secret from Duo>",
      "redirectUrl": "https://forms.example.com/oidc/callback"
    }
    
  3. Save the file and restart the GlobalForms service.

Setting

What to enter

issuer

The Issuer exactly as shown in Duo's Metadata section

clientId

The Client ID from Duo

clientSecret

The Client Secret from Duo

redirectUrl

The exact sign-in redirect URL you entered in Part 1

For all oidc settings, see Single Sign-On with OpenID Connect.

Part 3: Add the sign-in button to the sign-in page

Add a button labeled, for example, Sign in with Duo or Sign in with your company account to the User Login form (path user/login), which is the form on the GlobalForms sign-in page. In short:

  • Button Action: Submit, with Button Custom Logic data.name="oidc"; data.password="oidc"; data.oidc=true

  • Button Property Name (API tab): oidc

  • OIDC Login action: your user resource, triggered only if the button Equals true

  • Existing Login action: triggered only if the button Not Equal true

For the full steps, see Step 3 in Single Sign-On with OpenID Connect.

Part 4: Make sure users can be matched

After Duo confirms who the user is, GlobalForms looks in the selected user resources for a record whose usernameField (default email) matches the email address Duo sends. Upper and lower case are ignored.

  • The email comes from your Duo Single Sign-On authentication source, through the claim mapping in Part 1. Check that the attribute is filled in for each user.

  • If the email claim is missing, GlobalForms falls back to the user's Duo username, which usually won't match an email address. Fix the claim mapping rather than changing GlobalForms.

Single sign-on does not create GlobalForms accounts. Create or update the user records before asking people to sign in. Adding a user to Duo doesn't add them to GlobalForms.

Part 5: Test the sign-in

  1. Make sure your test user is enrolled in Duo and is in a group allowed to use the application.

  2. Open the GlobalForms sign-in page in a private browser window.

  3. Select the sign-in button, sign in with your directory credentials, and approve the Duo two-factor prompt.

  4. Confirm you return to GlobalForms signed in as the matching user, and that name-and-password sign-in still works.

Troubleshooting

Message or symptom

Cause and fix

Duo reports an invalid or unregistered redirect URL

The Sign-In Redirect URL in Duo doesn't exactly match redirectUrl. Compare protocol, host name, port and path.

Duo denies access, or says the user isn't allowed to use the application

The user isn't in a group allowed under User access, isn't enrolled in Duo, or is blocked by the application's policy. Check the Duo Authentication Log for the reason.

invalid_client

The Client ID or Client Secret is wrong or has extra spaces. Copy both again from the Metadata section.

GlobalForms shows an error right after you select the sign-in button

GlobalForms couldn't reach the issuer. Check that issuer was copied exactly from Duo and that the server can reach duosecurity.com over HTTPS.

Unable to complete OIDC login. User not found: …

No GlobalForms user record matches the value shown. If the value isn't an email address, the email claim isn't mapped; see Part 1, step 2. Otherwise check the user's email in your directory and in GlobalForms.

For messages shown by GlobalForms, see the troubleshooting table in Single Sign-On with OpenID Connect.

Security notes

  • Never run production workloads in GlobalForms without HTTPS. Sign-in tokens and user data travel between the browser and the server and can be intercepted without it.

  • Limit User access to the groups that need GlobalForms.

  • Duo policies, such as device health or location rules, apply to GlobalForms sign-in like any other application.

  • If the client secret is ever exposed, reset it in the Duo Admin Panel, update clientSecret and restart GlobalForms.