{"id":20171392,"url":"https://github.com/tofiqquadri/ng-keycloak","last_synced_at":"2026-01-21T04:33:17.236Z","repository":{"id":97050199,"uuid":"225035210","full_name":"tofiqquadri/ng-keycloak","owner":"tofiqquadri","description":"Keycloak Angular Library to provide Login, Logout and Check Login Status","archived":false,"fork":false,"pushed_at":"2020-07-27T04:48:59.000Z","size":134,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-02T07:23:38.788Z","etag":null,"topics":["angular","keycloak-angular","keycloak-server","ng-keycloak"],"latest_commit_sha":null,"homepage":"https://tofiqquadri.com","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/tofiqquadri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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":null,"patreon":"tofiqquadri","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-11-30T15:54:38.000Z","updated_at":"2023-08-18T06:38:20.000Z","dependencies_parsed_at":"2023-04-04T02:48:05.943Z","dependency_job_id":null,"html_url":"https://github.com/tofiqquadri/ng-keycloak","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.375,"last_synced_commit":"b66d0db3ec9f513d54b89472b6a4cb365efc2455"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tofiqquadri/ng-keycloak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tofiqquadri%2Fng-keycloak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tofiqquadri%2Fng-keycloak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tofiqquadri%2Fng-keycloak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tofiqquadri%2Fng-keycloak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tofiqquadri","download_url":"https://codeload.github.com/tofiqquadri/ng-keycloak/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tofiqquadri%2Fng-keycloak/sbom","scorecard":{"id":891289,"data":{"date":"2025-08-11","repo":{"name":"github.com/tofiqquadri/ng-keycloak","commit":"b66d0db3ec9f513d54b89472b6a4cb365efc2455"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T11:56:04.802Z","repository_id":97050199,"created_at":"2025-08-24T11:56:04.802Z","updated_at":"2025-08-24T11:56:04.802Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28626264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T02:47:06.670Z","status":"ssl_error","status_checked_at":"2026-01-21T02:45:44.886Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["angular","keycloak-angular","keycloak-server","ng-keycloak"],"created_at":"2024-11-14T01:24:36.734Z","updated_at":"2026-01-21T04:33:17.213Z","avatar_url":"https://github.com/tofiqquadri.png","language":"TypeScript","funding_links":["https://patreon.com/tofiqquadri"],"categories":[],"sub_categories":[],"readme":"# NgKeycloak\n\n* This is a simple library that provides capability to enable Keycloak Open-Id connect REST Login, Logout and Check Session.\n\n* It is developed using Angular \u003e=8.0.0 and its newly introduced ng g library schematics.\nLibrary location: projects/ng-keycloak directory of this repository.\n\n# Examples/Demo\n\n* A simple Example can be found under src/app directory of this repository. You can update the keycloak configuration with yours in the app/shared/config location.\n\n* In case your keycloak server is on different domain use angular proxy-config to run the project with redirect to the keycloak server and provide BASE_URL = '' in the keycloakConfig when setting the library configuration and redirect the /auth api requests to your keycloak server using proxy config.\n\n* You can find sample proxy config file in the src/ directory of this repository.\n\n# Installation\n`npm i ng-keycloak`\n\n# API\n`import { NgKeycloakModule } from 'ng-keycloak';`\n\n# Usage\n\n```typescript\n// Register the NgKeycloakModule in your app module.\nimport { NgKeycloakModule } from 'ng-keycloak';\n\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { AppComponent } from './app.component';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    NgKeycloakModule\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\n# Use the import NgKeycloakService in your component.\n\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { NgKeycloakService } from 'ng-keycloak';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.scss']\n})\nexport class AppComponent implements OnInit {\n\n  username = 'YOUR_KEYCLOAK_USERNAME_TO_LOGIN';\n  password = 'YOUR_KEYCLOAK_PASSWORD_TO_LOGIN';\n\n  // The BASE_URL is empty in case the proxy-config is used from Angular to resolve the CORS error\n  // If the CORS error is not present use the BASE URL as the keycloak url with the port number\n  // Example BASE_URL = 'http://13.43.53.42:30224'\n  keycloakConfig = {\n    BASE_URL: '',\n    realm: 'YOUR_REALM_NAME',\n    clientId: 'YOUR_CLIENT_ID',\n    credentials: {\n        secret: 'YOUR_CLIENT_SECRET'\n    }\n  };\n\n  constructor(private ngKeycloakService: NgKeycloakService) { }\n\n  ngOnInit(): void {\n\n    // You need to set the Keycloak Configuration using _setkeycloakConfig(config) method before you\n    // can use the Library\n    this.ngKeycloakService._setkeycloakConfig(keycloakConfig);\n\n    this.ngKeycloakService.logout().pipe().subscribe(logoutSuccessResponse =\u003e {\n      console.log('Logout Success Response', logoutSuccessResponse);\n    }, (logoutErrorResponse) =\u003e {\n      console.log('Logout Error', logoutErrorResponse);\n    });\n\n    this.ngKeycloakService.login(this.username, this.password).pipe().subscribe(loginSuccessResponse =\u003e {\n      console.log('Login Success', loginSuccessResponse);\n    }, (loginErrorResponse) =\u003e {\n      console.log('Login Error Response', loginErrorResponse);\n    });\n\n    this.ngKeycloakService.isLoggedIn().pipe().subscribe(loginStatusResponse =\u003e {\n      console.log('Login Check Status', loginStatusResponse);\n    }, (loginStatusErrorResponse) =\u003e {\n      console.log('Login Check Status Error', loginStatusErrorResponse);\n    });\n  }\n\n}\n```\n# Credits\n\nThis project is based on keycloak openid connect REST API interface. This is the first library developed my me in the Angular community with motivation from my friend Akshay Jain. Also want to thank the entire Angular team for creating this awesome framework.\n\n## Running the example in local env\n\n* `npm i`\n* Run `ng serve` for a dev server and running the demo app. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n* Also you need to add your keycloak configuration before you can test the application.\n\n# NgKeycloak\n\nThis library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.1.3.\n\n## Services\n\nFor web development and related services visit us at: https://developershive.com\nMail us at: contact@developershive.com\n\n## Author\n\nName: Tofiq Quadri\nEmail: tofiqquadri@developershive.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftofiqquadri%2Fng-keycloak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftofiqquadri%2Fng-keycloak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftofiqquadri%2Fng-keycloak/lists"}