chore(examples): add Astro integration app #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces a new Astro integration example for Aura Auth. The example demonstrates an integration using Astro + React, covering both client-side and server-side rendering authentication flows.
The implementation is based on the existing Next.js App Router example and has been adapted to support Astro’s architecture and conventions.
Note
This integration example highlights the core purpose of the integration examples: to identify unexpected behaviors, unsupported values, and framework-specific limitations when using the
@aura-stack/authpackage across different libraries and frameworks.In the Astro example, an issue was identified with environment variable resolution. Aura Auth currently reads environment variables via Node.js using
process.env, while Astro (similar to Vite) exposes environment variables throughimport.meta.env.Due to this incompatibility, the integration example cannot be fully completed at the moment, and this PR is marked as a draft.
Relevant code reference:
auth/packages/core/src/oauth/index.ts
Lines 55 to 68 in 8fadacd
A future enhancement is planned to add multi-environment variable support, allowing Aura Auth to read from different environment sources depending on the runtime.
Resources