Skip to content

WORKOS_ACTION_SECRET Required to be set #1

@BrannanKovachev

Description

@BrannanKovachev

I see some recent commits removing the requirement of WORKOS_ACTION_SECRET which makes sense to me, given that you might not need it. Unfortunately, in my dev deployment if I try to set up my auth.config.ts like this:

import { authKit } from './authKit'

const authConfig = { providers: authKit.getAuthConfigProviders() }

export default authConfig

then I get this error:

[1] ✖ Environment variable WORKOS_ACTION_SECRET is used in auth config file but its value was not set.
[1] Go to:
[1] 
[1]     https://dashboard.convex.dev/d/robust-hound-504/settings/environment-variables?var=WORKOS_ACTION_SECRET
[1] 
[1]   to set it up. 

Based on a quick search, I see a few instances of this type of string in the convex backend code.

I was able to get around it by configure my file as per the "typical" workos recommendation:

const clientId = process.env.WORKOS_CLIENT_ID

const authConfig = {
	providers: [
		{
			type: 'customJwt',
			issuer: `https://api.workos.com/`,
			algorithm: 'RS256',
			applicationID: clientId,
			jwks: `https://api.workos.com/sso/jwks/${clientId}`,
		},
		{
			type: 'customJwt',
			issuer: `https://api.workos.com/user_management/${clientId}`,
			algorithm: 'RS256',
			jwks: `https://api.workos.com/sso/jwks/${clientId}`,
		},
	],
}

export default authConfig

Fixing this is not an urgent need on my end. Just wanted to share in case someone else hit this & request some more experienced eyes on this.

P.S.
Thank you for the quick work on this! I was trying to set it up earlier in the day on 12/1 but the crypto package was giving me issues with the lack of a node environment. Super nice to see that addressed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions