Skip to content

Conversation

@danisal
Copy link
Contributor

@danisal danisal commented May 30, 2025


Summary

This pull request introduces basic authentication functionality and refactors the related logic for better clarity and performance.

image

Changes

  • Added middleware to enable basic authentication.
  • Configured authentication credentials using environment variables.
  • Implemented redirection logic for unauthorized requests, enhancing security.
  • Refactored authentication flow for code clarity and efficiency.
  • Ensured proper routing and handling of PDF requests for authenticated users.

danisal added 2 commits May 30, 2025 14:47
- This commit introduces basic authentication functionality.
- Environment variables were added to configure authentication credentials, and a middleware was implemented to enforce it.
- Unauthorized requests are now redirected to a new API route, providing a secure access layer.
- Reorganized authentication flow for clarity and efficiency.
- Ensured PDF requests are properly rewritten only for authenticated users.
- Unauthenticated users are now correctly redirected to the auth endpoint.
@danisal danisal requested review from didrikhegna and vydimitrov May 30, 2025 14:16
@vercel
Copy link

vercel bot commented May 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nextjs-furnitut ✅ Ready (Inspect) Visit Preview May 30, 2025 2:16pm

@danisal
Copy link
Contributor Author

danisal commented May 30, 2025

Note that if we change the BASIC_AUTH env variable, we need to redeploy to catch up the changes.

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.

2 participants