{"id":32271259,"url":"https://github.com/otajonogli/drf_client","last_synced_at":"2026-02-21T16:01:10.416Z","repository":{"id":242232735,"uuid":"806582965","full_name":"otajonogli/drf_client","owner":"otajonogli","description":"A complete implementation of Authentication and Rest API connection with the backends that use Django Rest Framework. Supports refreshing and storing tokens securely.","archived":false,"fork":false,"pushed_at":"2024-06-03T11:09:04.000Z","size":302,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T16:20:58.232Z","etag":null,"topics":["django","django-flutter","django-oauth-toolkit","django-rest-framework","drf-client","flutter","token-authetication"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/drf_client","language":"Dart","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/otajonogli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2024-05-27T13:26:26.000Z","updated_at":"2024-10-29T07:23:35.000Z","dependencies_parsed_at":"2024-06-01T15:49:04.826Z","dependency_job_id":"1613d996-6109-47fd-b2f7-370bff857b9d","html_url":"https://github.com/otajonogli/drf_client","commit_stats":null,"previous_names":["otajonov/drf_client","otajonogli/drf_client"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/otajonogli/drf_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otajonogli%2Fdrf_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otajonogli%2Fdrf_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otajonogli%2Fdrf_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otajonogli%2Fdrf_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otajonogli","download_url":"https://codeload.github.com/otajonogli/drf_client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otajonogli%2Fdrf_client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29685018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["django","django-flutter","django-oauth-toolkit","django-rest-framework","drf-client","flutter","token-authetication"],"created_at":"2025-10-22T22:47:39.468Z","updated_at":"2026-02-21T16:01:10.407Z","avatar_url":"https://github.com/otajonogli.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"Helps you to automatically authenticate and store tokens and refresh them, also make api requests using them.\n\nThis project is under development. View the GitHub code and contribute 👉 https://github.com/Otajonov/drf_client\n\n## Features\n\n- ✅ Automatically store tokens using Flutter Secure Storage\n- ✅ Automatically refresh tokens\n- ✅ Supports Oauth2 by Django Oauth Toolkit\n- ✅ Easy REST API call with auth credentials\n- ✅ More coming soon ...\n\n## Getting started\n\nTo start using package, add it to your dependencies by running this:\n```shell  \nflutter pub add drf_client\n```  \nor add this line into your pubspec.yaml under dependencies:\n```yaml\ndependencies:  \n  flutter:  \n    sdk: flutter\n  # your other dependencies ...\n  \n  drf_client: \u003clatest_version\u003e\n```\nThen import the package in desired files:\n\n```dart\nimport 'package:drf_client/drf_client.dart'; \n```\nEnjoy coding!\n\n## Usage\n\nFirstly, initialize the config:\n```dart  \n\n  void main() {\n  \n  // existing code\n  \n    DrfClient client = DrfClient();\n    client.addConfig('your-app', DrfConfig(\n      authType: AuthType.drfBuiltInAuth,\n      baseUrl: 'https://your-app.com/api',\n      tokenUrl: 'https://your-app.com/api/token',\n      refreshTokenUrl: 'https://your-app.com/api/token/refresh',\n\n      usernameField: 'username', // default username, change this if you are using custom user model in django\n      passwordField: 'password', // def password, change this if you changed password field in you user model\n      refreshField: 'refresh_token', // change this to comply with your token refresh logic if JWT used\n      \n\n      // Set this if u are using Authorization Code over Django-oauth-toolkit\n      // oauthConfig: OauthConfig(\n      // clientId: \"\",\n      // clientSecret: \"\",\n      // authorizationEndpointUrl: \"https://ilmchat.com/auth/authorize/\",\n      // redirectScheme: 'you-app-shceme'\n      //\n      // )\n    ));\n  }\n    \n```  \n\nYou can also set multiple config so that you can make request and authenticate multiple django servers at the same code by giving specific app name in config.\n\n## Authenticating users\n\nvia drfBuiltInAuth:\n\n```dart\n\nDrfClient client = DrfClient();\n\nclient.loginDrfBuiltIn()\n\n\n```\n\n## making requests\n\n```dart\n\nDrfClient client = DrfClient();\n\nclient.get() // post() put() patch() delete()\n\n\n```\n\nIt will use stored user token in requests if logged in.\nYou can remove Token from auth header by includeToken: false","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotajonogli%2Fdrf_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotajonogli%2Fdrf_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotajonogli%2Fdrf_client/lists"}