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

ci:(scripts): sso and stripe setup script TASK-1419 #5408

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

Conversation

olive-KTB
Copy link

🗒️ Checklist

  1. run linter locally
  2. update all related docs (API, README, inline, etc.), if any
  3. draft PR with a title <type>(<scope>)<!>: <title> TASK-1234
  4. tag PR: at least frontend or backend unless it's global
  5. fill in the template below and delete template comments
  6. review thyself: read the diff and repro the preview as written
  7. open PR & confirm that CI passes
  8. request reviewers, if needed
  9. delete this section before merging

📖 Description

  • Added stripe_setup.py script:
    • Configures Stripe API keys
    • Creates/updates webhook endpoints
    • Handles webhook syncing and cleanup
    • If webhook variables are not set, a new webhook will be created
    • If webhook variables are set, an existing webhook configuration will be used

Required Environment Variables:

    STRIPE_ENABLED=True
    STRIPE_LIVE_MODE=False  # or True for production
    STRIPE_TEST_SECRET_KEY=sk_test_...  # for test mode
    STRIPE_LIVE_SECRET_KEY=sk_live_...  # for live mode

Required only for new webhook creation:

   DOMAIN_NAME=yourdomain.com

Webhook Environment Variables for Existing Webhook (all required if any are set):

    DJSTRIPE_WEBHOOK_SECRET=whsec_...
    DJSTRIPE_WEBHOOK_URL=https://...
    DJSTRIPE_UUID=...
    DJSTRIPE_WEBHOOK_ID=we_...
  • Added sso_setup.py script:
    • Configures Google SSO integration
    • Creates/updates Social Application settings

If GOOGLE_AUTH_ENABLED=True, required environment variables

   SOCIAL_APP_NAME=social-app-name
   SOCIAL_APP_PROVIDER_ID=provider-id
   GOOGLE_CLIENT_ID=client-id
   GOOGLE_CLIENT_SECRET=client-secret

Usage

Stripe Setup

python manage.py runscript stripe_setup

SSO Setup

python manage.py runscript setup_sso

@olive-KTB olive-KTB requested a review from bufke January 6, 2025 18:18
kobo/settings/base.py Outdated Show resolved Hide resolved
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