vets-who-code-app icon indicating copy to clipboard operation
vets-who-code-app copied to clipboard

Add GitHub login with organization and group restrictions

Open jeromehardaway opened this issue 1 year ago • 1 comments

Implements GitHub authentication and access control for the Vets Who Code Next.js application, ensuring that only members of the Vets Who Code organization and specifically those in the "students" group can access the application. Additionally, updates the login page styling with Tailwind CSS for a responsive and accessible UI.

  • Integrates GitHub authentication using NextAuth.js in pages/api/auth/[...nextauth].ts, configuring GitHub as an authentication provider and adding callbacks to verify organization and group membership.
  • Adds utility functions in pages/api/auth/organization-membership.js and pages/api/auth/group-membership.js to check for membership in the Vets Who Code organization and the "students" group using the GitHub API.
  • Updates the login form in components/forms/login-form.tsx to integrate with NextAuth.js for GitHub login, including UI feedback for login success or failure.
  • Enhances Tailwind CSS configuration in tailwind.config.js by adding custom styles for the login page, improving the visual presentation and user experience.
  • Updates environment variables in env.local with GitHub OAuth application Client ID, Client Secret, and the Vets Who Code GitHub organization ID to support the authentication flow.
  • Revises documentation in README.md to include GitHub OAuth setup instructions and details on configuring access restrictions based on organization and group membership.

For more details, open the Copilot Workspace session.

jeromehardaway avatar Jun 15 '24 23:06 jeromehardaway

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

Name Status Preview Comments Updated (UTC)
vets-who-code-app ❌ Failed (Inspect) Jun 15, 2024 11:20pm

vercel[bot] avatar Jun 15 '24 23:06 vercel[bot]