Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Turn Better Auth into Astro Integration #38

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cameronapak
Copy link
Owner

My attempt. Close, but not there.

- Added a new authentication integration using Better Auth, including middleware and actions for sign-in, sign-up, and sign-out functionalities.
- Updated the Astro configuration to include the Better Auth integration with customizable options for session management and account linking.
- Refactored existing authentication logic to utilize the new integration, enhancing code organization and maintainability.
- Introduced new API routes for handling authentication requests, improving the overall structure of the authentication flow.

These changes provide a more robust and flexible authentication system for the application.
- Removed the Vite optimization dependency exclusion for "astro:db" in the Astro configuration.
- Updated middleware to use `await` for `createAuthMiddleware`, ensuring proper asynchronous handling.
- Refactored authentication actions to use `await` for `createAuthActions` and exported `setAuthCookiesFromResponse`.
- Enhanced the `handleAuthResponse` function to dynamically import necessary modules and handle cookies more effectively.
- Updated the `createAuth` function to support asynchronous imports for better performance and flexibility.
- Improved the middleware definition to ensure it returns a proper middleware function.

These changes streamline the authentication process and improve the integration with Better Auth, enhancing overall application performance.
@cameronapak cameronapak self-assigned this Nov 28, 2024
Copy link

netlify bot commented Nov 28, 2024

Deploy Preview for freedom-stack failed.

Name Link
🔨 Latest commit 1c689b5
🔍 Latest deploy log https://app.netlify.com/sites/freedom-stack/deploys/6747f9e7c63d4000083cc3f5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant