{"id":23432822,"url":"https://github.com/hub9/angular-oauth-client","last_synced_at":"2026-05-03T07:41:59.478Z","repository":{"id":57116711,"uuid":"117743232","full_name":"hub9/angular-oauth-client","owner":"hub9","description":"Angular authentication module for OAuth APIs","archived":false,"fork":false,"pushed_at":"2018-02-12T18:09:13.000Z","size":337,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"v2","last_synced_at":"2025-03-17T01:36:46.038Z","etag":null,"topics":["angular","oauth-api","oauth2"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hub9.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-16T21:17:54.000Z","updated_at":"2018-02-12T16:20:44.000Z","dependencies_parsed_at":"2022-08-22T22:20:13.045Z","dependency_job_id":null,"html_url":"https://github.com/hub9/angular-oauth-client","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hub9%2Fangular-oauth-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hub9%2Fangular-oauth-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hub9%2Fangular-oauth-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hub9%2Fangular-oauth-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hub9","download_url":"https://codeload.github.com/hub9/angular-oauth-client/tar.gz/refs/heads/v2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248058515,"owners_count":21040767,"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":["angular","oauth-api","oauth2"],"created_at":"2024-12-23T10:55:32.735Z","updated_at":"2026-05-03T07:41:54.456Z","avatar_url":"https://github.com/hub9.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.svg\" /\u003e\n  \u003cbr/\u003e\n  Angular OAuth Client\n\u003c/h1\u003e\n\r\nAngular module for OAuth API authentication and wrapper for Angular's HTTP Client.\n\n\r\n## Install\r\n\r\n```bash\r\n$ npm install --save @hub9/angular-oauth-client\r\n```\r\n\n\r\n## Configure\r\n\r\n```typescript\r\n// ...\r\nimport { AuthModule } from '@hub9/angular-oauth-client';\r\n\r\nconst apiConfig = {\r\n  apiId: '\u003cApi_Id\u003e',\r\n  apiSecret: '\u003cApi_Secret\u003e',\r\n  apiUrl: 'api/',\r\n  apiOauthUrl: 'oauth/',\r\n  unauthorizedRoute: '/login/',\r\n};\r\n\r\n@NgModule({\r\n  // ...\r\n  imports: [\r\n    // ...\r\n    AuthModule.forRoot(apiConfig),\r\n    // ...\r\n  ],\r\n  // ...\r\n})\r\nexport class AppModule {}\r\n```\r\n\r\n## Usage\r\n\r\n```typescript\r\nimport { AuthService } from '@hub9/angular-oauth-client';\r\n\r\n@Component({...})\r\nexport class MyComponent {\r\n  constructor(private auth: AuthService) {}\r\n\r\n  login(username, password) {\r\n    this.auth.login(username, password).subscribe(response =\u003e {\r\n      console.log('Auth data:', response);\r\n    });\r\n  }\r\n\r\n  logout() {\r\n    this.auth.logout();\r\n  }\r\n\r\n  httpRequests() {\r\n    // Do a GET request using authentication headers\r\n    this.auth.get('myresource/1/').subscribe(data =\u003e console.log(data));\r\n\r\n    // Do a POST request using authentication headers and sending data\r\n    this.auth.post('myresource/', { name: 'name' }).subscribe(data =\u003e console.log(data));\r\n\r\n    // Do a PUT request using authentication headers and sending data\r\n    this.auth.put('myresource/1/', { name: 'name' }).subscribe(data =\u003e console.log(data));\r\n\r\n    // Do a DELETE request using authentication headers\r\n    this.auth.delete('myresource/1/').subscribe(() =\u003e console.log('deleted'));\r\n  }\r\n}\r\n```\r\n\r\n## Contribute\r\n\r\n```bash\r\n$ git clone https://github.com/hub9co/angular-oauth-client.git\r\n$ cd angular-oauth-client\r\n$ npm install\r\n$ npm run build\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhub9%2Fangular-oauth-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhub9%2Fangular-oauth-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhub9%2Fangular-oauth-client/lists"}