Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

Adds authentication via OAuth providers and Stripe integration for monthly subscription payments to access premium content.

Authentication (NextAuth.js)

  • Google and GitHub OAuth providers
  • JWT session strategy with subscription status tracking
  • Custom sign-in page with provider buttons
  • Header component with auth status, avatar, and premium badge

Stripe Payments

  • Monthly subscription checkout ($9.99/month)
  • Webhook handler for subscription lifecycle events (checkout.session.completed, customer.subscription.updated/deleted, invoice.payment_failed)
  • Customer portal for subscription management
  • Test card numbers displayed on subscription page for development

Configuration

  • .env.example template with all required variables
  • Updated SETUP.md with OAuth and Stripe setup instructions
  • next.config.ts updated to support API routes (static export disables auth/payments)
# Required environment variables
NEXTAUTH_SECRET=...
GOOGLE_CLIENT_ID=... / GITHUB_ID=...
STRIPE_SECRET_KEY=...
STRIPE_MONTHLY_PRICE_ID=...

Note: Subscription data uses in-memory storage for demo purposes. Replace with database for production.

Screenshots

Sign In Subscription Test Cards
Sign In Subscription Test Cards

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com//advisories
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Create auth layer + connect to Stripe for payments</issue_title>
<issue_description>- Login with Google or GitHub

  • Connection to Stripe to collect payment (monthly subscription to access reponses to questions)
  • Make Stripe integration testable with a fake card number in test mode somehow</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add authentication layer and Stripe payment connection Add auth layer with Google/GitHub OAuth and Stripe subscription payments Dec 3, 2025
Copilot AI requested a review from mbianchidev December 3, 2025 16:58
Copilot finished work on behalf of mbianchidev December 3, 2025 16:58
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.

Create auth layer + connect to Stripe for payments

2 participants