Skip to content

feat(core): add secret configuration option#22

Merged
halvaradop merged 3 commits intomasterfrom
feat/add-secret-config-option
Dec 9, 2025
Merged

feat(core): add secret configuration option#22
halvaradop merged 3 commits intomasterfrom
feat/add-secret-config-option

Conversation

@halvaradop
Copy link
Copy Markdown
Member

@halvaradop halvaradop commented Dec 6, 2025

Description

This pull request introduces the secret configuration option, which allows setting the secret key used to encrypt and sign JWTs and CSRF tokens in the aura-stack/auth package in a declarative way. This new option enables overriding the default usage of the AURA_AUTH_SECRET environment variable by explicitly providing the value to the Aura Auth instance via the secret option.

export const auth = createAuth({
  oauth: ["github"],
  secret: "secret-key"
})

With the new implementation, the secret option takes priority. If it is not provided, Aura Auth will fall back to the AURA_AUTH_SECRET environment variable. If neither is defined, an error will be thrown since a secret is required for security.

Note

For security purposes, aura-auth/jose enforces that the secret must be at least 32 bytes.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Dec 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
auth Ready Ready Preview Comment Dec 9, 2025 10:19pm

@halvaradop halvaradop marked this pull request as draft December 6, 2025 22:10
@halvaradop halvaradop marked this pull request as ready for review December 9, 2025 22:18
@halvaradop halvaradop merged commit 46b1af3 into master Dec 9, 2025
2 checks passed
@halvaradop halvaradop deleted the feat/add-secret-config-option branch December 9, 2025 22:19
@halvaradop halvaradop added enhancement New feature or request feature New functionality labels Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant