Using Generic OAuth Plugin to connect to Follow Up Boss

@Better Auth i’m trying to use the Generic OAuth plugin to enable an oauth link flow with followupboss. i have the following config:
    genericOAuth({
        config: [
            {
                authorizationUrl:
                    'https://app.followupboss.com/oauth/authorize',
                clientId: FUB_CLIENT_ID,
                clientSecret: FUB_CLIENT_SECRET,
                providerId: 'followupboss',
                scopes: [], // FUB doesn't specify scopes in their docs
                tokenUrl: 'https://app.followupboss.com/oauth/token',
            },
        ],
    }),

where FUB_CLIENT_ID and FUB_CLIENT_SECRET are secrets available in the server environment. i’m trying to invoke the link flow for authed users using the following code:
await authClient.oauth2.link({
    callbackURL: `${window.location.origin}/api/auth/oauth2/callback/followupboss`,
    providerId: 'followupboss',
});

here’s what i see after invoking authClient.oauth2.link(...):

  1. goes to https://login.followupboss.com/login?start_url=REDACTED where i login to FUB
  2. goes to https://outlyne.followupboss.com/oauth/authorize?url=oauth%2Fauthorize&response_type=code&client_id=REDACTED&state=REDACTED&scope=&redirect_uri=https%3A%2F%2Foutlyne.com%2Fapi%2Fauth%2Foauth2%2Fcallback%2Ffollowupboss&oauth_fresh_login=1, where i see “Outlyne wants to access your Follow Up Boss Account” and have the option to Deny or GRANT ACCESS and i click GRANT ACCESS
  3. goes to https://outlyne.com/api/auth/error?error=oauth_code_verification_failed with Better Auth Error
with logger.level: 'debug' , i get this logged from a request with url https://outlyne.com/api/auth/oauth2/callback/followupboss?state=REDACTED&response=approved&code=REDACTED:
{
    "error": "invalid_client",
    "error_description": "Basic Authorization header is required",
    "status": 400,
    "statusText": "Bad Request"
}
Authenticate users with any OAuth provider
Was this page helpful?