{"id":18700060,"url":"https://github.com/rafaelurben/django-account","last_synced_at":"2025-11-08T21:30:21.870Z","repository":{"id":107888409,"uuid":"536759520","full_name":"rafaelurben/django-account","owner":"rafaelurben","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-09T14:33:54.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T15:31:48.296Z","etag":null,"topics":["account-management","authentication","django"],"latest_commit_sha":null,"homepage":"https://app.rafaelurben.ch/account","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rafaelurben.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"rafaelurben","patreon":"rafaelurben","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-09-14T21:06:20.000Z","updated_at":"2025-02-09T14:33:56.000Z","dependencies_parsed_at":"2023-12-09T17:25:44.527Z","dependency_job_id":"9b9568b5-d240-4b07-9a53-dc3c31cf6218","html_url":"https://github.com/rafaelurben/django-account","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelurben%2Fdjango-account","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelurben%2Fdjango-account/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelurben%2Fdjango-account/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelurben%2Fdjango-account/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafaelurben","download_url":"https://codeload.github.com/rafaelurben/django-account/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239561445,"owners_count":19659462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["account-management","authentication","django"],"created_at":"2024-11-07T11:35:32.932Z","updated_at":"2025-11-08T21:30:21.782Z","avatar_url":"https://github.com/rafaelurben.png","language":"HTML","funding_links":["https://github.com/sponsors/rafaelurben","https://patreon.com/rafaelurben"],"categories":[],"sub_categories":[],"readme":"# django-account\n\nA simple django app used in [app.rafaelurben.ch/account](https://app.rafaelurben.ch/account) for users to manage their\nprofile and authentication methods.\n\nDepends on [social-auth-app-django](https://github.com/python-social-auth/social-app-django)\nand [django-passkeys](https://github.com/mkalioby/django-passkeys).\n\n## Features\n\n- [x] Account overview page\n- [x] Profile page (username, first \u0026 last name)\n- [x] Authentication method management\n    - [x] Passkey support (via [django-passkeys](https://github.com/mkalioby/django-passkeys))\n    - [x] OAuth2 support (via [social-auth-app-django](https://github.com/python-social-auth/social-app-django))\n    - [x] Username/password support (via Django itself)\n        - [x] Password change \u0026 reset\n- [x] \"Back to app\" button that will keep track on where you want to go\n- [x] Multilingual (currently supported: 🇬🇧 English and 🇩🇪 German)\n- [x] Help section\n\n### Planned features\n\nSee the [project board](https://github.com/users/rafaelurben/projects/10/views/1) for planned features.\n\n## Example config\n\n### urls.py (excerpt)\n\n```python\nurlpatterns = [\n    path('account/', include('account.urls')),\n    path('admin/pwreset', lambda r: redirect(reverse('account:password-reset')), name=\"admin_password_reset\"),\n    path('auth/', include('social_django.urls', namespace=\"social-auth\")),\n    path('passkeys/', include('passkeys.urls', namespace=\"passkeys\")),\n    path('.well-known/', include('account.well_known.urls')),\n]\n```\n\n### settings.py (excerpt)\n\n```python\n# Installed apps\n\nINSTALLED_APPS = [\n    ...,\n    'account',\n    'django.contrib.auth',\n    'social_django',\n    'passkeys',\n]\n\n# Authentication backends\n\nAUTHENTICATION_BACKENDS = (\n    'account.backends.GithubOAuth2',\n    'account.backends.GoogleOAuth2',\n    'account.backends.DiscordOAuth2',\n    'account.backends.MicrosoftOAuth2',\n    'passkeys.backend.PasskeyModelBackend',\n)\n\n# Account pages config\n\nACCOUNT_APPLICATION_NAME = 'My super cool example app'\nACCOUNT_HELP_SUPPORT_OPTIONS = [('E-Mail', 'mailto:help@example.com'),\n                                ('Help center', 'https://example.com/help')]\n\n# Passkeys config\n\nFIDO_SERVER_ID = \"your.main.domain\"\nFIDO_SERVER_NAME = \"Your app name\"\nKEY_ATTACHMENT = None\n\nPASSKEY_RELATED_ORIGINS = [\n    \"https://your.second.domain\",\n    \"https://your.third.domain\",\n]\n\n# Social Auth Config\n\nSOCIAL_AUTH_RAISE_EXCEPTIONS = False\nSOCIAL_AUTH_LOGIN_ERROR_URL = reverse_lazy('account:home')\n\nSOCIAL_AUTH_URL_NAMESPACE = 'social-auth'\n\nSOCIAL_AUTH_PIPELINE = (\n    # Get the information we can about the user and return it in a simple\n    # format to create the user instance later. In some cases the details are\n    # already part of the auth response from the provider, but sometimes this\n    # could hit a provider API.\n    'social_core.pipeline.social_auth.social_details',\n\n    # Get the social uid from whichever service we're authing thru. The uid is\n    # the unique identifier of the given user in the provider.\n    'social_core.pipeline.social_auth.social_uid',\n\n    # Verifies that the current auth process is valid within the current\n    # project, this is where emails and domains whitelists are applied (if\n    # defined).\n    'social_core.pipeline.social_auth.auth_allowed',\n\n    # Checks if the current social-account is already associated in the site.\n    'social_core.pipeline.social_auth.social_user',\n\n    # Make up a username for this person, appends a random string at the end if\n    # there's any collision.\n    'social_core.pipeline.user.get_username',\n\n    # Send a validation email to the user to verify its email address.\n    # Disabled by default.\n    # 'social_core.pipeline.mail.mail_validation',\n\n    # Associates the current social details with another user account with\n    # a similar email address. Disabled by default.\n    'social_core.pipeline.social_auth.associate_by_email',\n\n    # Create a user account if we haven't found one yet.\n    'social_core.pipeline.user.create_user',\n\n    # Create the record that associates the social account with the user.\n    'social_core.pipeline.social_auth.associate_user',\n\n    # Populate the extra_data field in the social record with the values\n    # specified by settings (and the default ones like access_token, etc).\n    'social_core.pipeline.social_auth.load_extra_data',\n\n    # Update the user record with any changed info from the auth service.\n    'social_core.pipeline.user.user_details',\n)\n\n# OAuth Google config\n\nSOCIAL_AUTH_GOOGLE_OAUTH2_KEY = os.getenv(\"OAUTH_GOOGLE_KEY\")\nSOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = os.getenv(\"OAUTH_GOOGLE_SECRET\")\n\nSOCIAL_AUTH_GOOGLE_OAUTH2_AUTH_EXTRA_ARGUMENTS = {\n    'prompt': 'select_account'\n}\n\n# OAuth GitHub config\n\nSOCIAL_AUTH_GITHUB_KEY = os.getenv(\"OAUTH_GITHUB_KEY\")\nSOCIAL_AUTH_GITHUB_SECRET = os.getenv(\"OAUTH_GITHUB_SECRET\")\n\nSOCIAL_AUTH_GITHUB_SCOPE = [\"user:email\"]\n\n# OAuth Discord config\n\nSOCIAL_AUTH_DISCORD_KEY = os.getenv(\"OAUTH_DISCORD_KEY\")\nSOCIAL_AUTH_DISCORD_SECRET = os.getenv(\"OAUTH_DISCORD_SECRET\")\n\nSOCIAL_AUTH_DISCORD_SCOPE = [\"identify\", \"email\"]\n\n# OAuth Microsoft config\n\nSOCIAL_AUTH_AZUREAD_KEY = os.getenv(\"OAUTH_MICROSOFT_KEY\")\nSOCIAL_AUTH_AZUREAD_SECRET = os.getenv(\"OAUTH_MICROSOFT_SECRET\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaelurben%2Fdjango-account","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafaelurben%2Fdjango-account","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaelurben%2Fdjango-account/lists"}