Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,16 @@ GOOGLE_CLIENT_ID=your-google-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_REDIRECT_URI=http://localhost:8000/api/v1/auth/oauth/google/callback

# Sign in with Apple (Return URL: http://localhost:8000/api/v1/auth/oauth/apple/callback)
# Sign in with Apple (Return URL must be HTTPS; Apple rejects HTTP localhost)
APPLE_CLIENT_ID=com.scholarpal.web
APPLE_TEAM_ID=YOUR_APPLE_TEAM_ID
APPLE_KEY_ID=YOUR_APPLE_KEY_ID
APPLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nYOUR_APPLE_P8_PRIVATE_KEY\n-----END PRIVATE KEY-----"
APPLE_REDIRECT_URI=http://localhost:8000/api/v1/auth/oauth/apple/callback
APPLE_REDIRECT_URI=https://<your-domain>/api/v1/auth/oauth/apple/callback

# --- Password Reset Email (Optional SMTP; logs reset link in dev when unset) ---
SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
SMTP_PASSWORD=
[email protected]
33 changes: 33 additions & 0 deletions backend/alembic/versions/0004_terms_acceptance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""add terms_accepted_version and terms_accepted_at to users

Revision ID: 0004_terms_acceptance
Revises: 0003_oauth_accounts
Create Date: 2026-12-02 20:20:00.000000
"""

from __future__ import annotations

from collections.abc import Sequence

import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "0004_terms_acceptance"
down_revision: str | None = "0003_oauth_accounts"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None


def upgrade() -> None:
op.add_column("users", sa.Column("terms_accepted_version", sa.String(length=32), nullable=True))
op.add_column(
"users",
sa.Column("terms_accepted_at", sa.DateTime(timezone=True), nullable=True),
)


def downgrade() -> None:
op.drop_column("users", "terms_accepted_at")
op.drop_column("users", "terms_accepted_version")
Loading
Loading