Notechondria
Version: 0.1.8 Build Date: 2026-04-07T18:00
What's Changed
Google and GitHub OAuth sign-in
-
Added
SocialAccountmodel linking Django users to external OAuth providers (Google, GitHub). Stores provider, provider_uid, email, extra_data with unique constraint on (provider, provider_uid). -
Added
GoogleOAuthApiView— exchanges Google authorization code or ID token for an app auth token. Verifies via Google tokeninfo endpoint, validates audience, creates or links user. -
Added
GitHubOAuthApiView— exchanges GitHub authorization code for access token, fetches user profile and primary verified email, creates or links user. -
Added
OAuthConfigApiView— public endpoint returning OAuth client IDs and redirect URIs so frontends can construct authorization URLs without hardcoding credentials. -
Added
SocialAccountListApiViewandSocialAccountUnlinkApiViewfor authenticated users to manage linked social accounts. - OAuth user creation handles three cases: (1) existing social link updates and returns, (2) existing email user auto-links the social account, (3) new user validates invitation code if required and creates account with unusable password.
-
Both Google and GitHub views accept optional
redirect_urifrom frontend, falling back to configured settings, so multiple frontend apps can share the same OAuth credentials. -
Frontend
NotechondriaClientextended withloginWithGoogle,loginWithGithub, andgetOAuthConfigmethods in all three apps (editor, planner, portal). -
Added Google and GitHub buttons to
_AuthHubin all three apps, gated byonGoogleLogin/onGithubLogincallbacks (hidden when null). -
Added
_launchOAuth(provider)and_handleOAuthCallback()to all three app shells. On button press, fetches OAuth config, constructs auth URL, saves redirect_uri to SharedPreferences, and redirects browser. On page load, detects?code=&state=query parameters and auto-completes login. -
Added
url_strategy.dart/url_strategy_web.dartto planner and portal apps (editor already had them) withbrowserRedirectfor same-tab navigation.
Jenkins deployment fixes
-
Fixed
.env.deploysourcing error (exit code 127):DJANGO_ALLOWED_HOSTS_COMPOSEvalue with spaces was interpreted as a command. Wrapped in single quotes inprepare_env.shheredoc output. -
Fixed Docker build context errors (exit code 17): root
docker-compose.ymlhadcontext: ./backendbut Dockerfile references files relative to repo root. Changed tocontext: .anddockerfile: backend/Dockerfile.
Jenkins documentation
- Added first-time Jenkins setup guide (plugin installation, Docker access, pipeline job creation, environment injection, first build troubleshooting).
- Added OAuth credential variables to Jenkins Properties Content example.
Environment files
-
Added
GITHUB_AUTHORIZED_REDIRECT_URI,GOOGLE_OAUTH_CLIENT_ID,GOOGLE_OAUTH_CLIENT_SECRET,GOOGLE_AUTHORIZED_REDIRECT_URIplaceholders tosample.envandsample.render.env. -
Added OAuth environment variables to
backend/docker-compose.ymlapp service.
Files Changed
backend/creators/models.py-- AddedSocialProviderChoicesenum andSocialAccountmodelbackend/creators/migrations/0026_socialaccount.py-- Migration for SocialAccount tablebackend/creators/api.py-- Added OAuthConfigApiView, GoogleOAuthApiView, GitHubOAuthApiView, SocialAccountListApiView, SocialAccountUnlinkApiView, helper functionsbackend/notechondria/api_urls.py-- Added routes for oauth-config, google, github, social-accountsbackend/notechondria/settings.py-- Added OAuth settings (GOOGLE_OAUTH_, GITHUB_APP_CLIENT_, redirect URIs)backend/docker-compose.yml-- Added OAuth env vars to app servicedeployment/jenkins/scripts/prepare_env.sh-- Quoted DJANGO_ALLOWED_HOSTS_COMPOSE, added OAuth env varsdocker-compose.yml-- Fixed build context from./backendto.frontend/editor_app/lib/core/client.dart-- Added loginWithGoogle, loginWithGithub, getOAuthConfigfrontend/editor_app/lib/core/url_strategy.dart-- Added browserRedirect stubfrontend/editor_app/lib/core/url_strategy_web.dart-- Added browserRedirect implementationfrontend/editor_app/lib/components/auth_dialogs.dart-- Added onGoogleLogin/onGithubLogin to _AuthHub with Google/GitHub buttonsfrontend/editor_app/lib/modules/settings.dart-- Wired OAuth callbacks through _SettingsPagefrontend/editor_app/lib/app_shell.dart-- Added _launchOAuth, _handleOAuthCallback, wired to settingsfrontend/planner_app/lib/core/client.dart-- Added loginWithGoogle, loginWithGithub, getOAuthConfigfrontend/planner_app/lib/core/url_strategy.dart-- New: browserRedirect stubfrontend/planner_app/lib/core/url_strategy_web.dart-- New: browserRedirect web implementationfrontend/planner_app/lib/main.dart-- Added url_strategy conditional importfrontend/planner_app/lib/modules/settings.dart-- Added OAuth callbacks to _AuthHub and _SettingsPagefrontend/planner_app/lib/app_shell.dart-- Added _launchOAuth, _handleOAuthCallback, wired to settingsfrontend/portal_app/lib/core/client.dart-- Added loginWithGoogle, loginWithGithub, getOAuthConfigfrontend/portal_app/lib/core/url_strategy.dart-- New: browserRedirect stubfrontend/portal_app/lib/core/url_strategy_web.dart-- New: browserRedirect web implementationfrontend/portal_app/lib/main.dart-- Added url_strategy conditional importfrontend/portal_app/lib/modules/settings.dart-- Added OAuth callbacks to _AuthHub and _SettingsPagefrontend/portal_app/lib/app_shell.dart-- Added _launchOAuth, _handleOAuthCallback, wired to settingssample.env-- Added OAuth credential placeholderssample.render.env-- Added OAuth credential placeholdersdocs/deployment/deploy.md-- Added Jenkins first-time setup guide, OAuth vars to Properties Contentdocs/TASKS.md-- Marked OAuth and social account tasks as completedocs/versions/0.1.8.md-- This version document