{"id":19096140,"url":"https://github.com/heresy/angular2-social-login","last_synced_at":"2025-04-30T14:10:22.779Z","repository":{"id":182677608,"uuid":"74295732","full_name":"heresy/angular2-social-login","owner":"heresy","description":"Simple client side social authentication for Angular2 application.","archived":false,"fork":false,"pushed_at":"2018-02-18T09:25:43.000Z","size":30,"stargazers_count":30,"open_issues_count":17,"forks_count":38,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T16:46:43.069Z","etag":null,"topics":["angular","angular2","angular2-social-login","angular4","angular4-social-login","social-login"],"latest_commit_sha":null,"homepage":"","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/heresy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-20T18:58:44.000Z","updated_at":"2024-03-05T15:46:08.000Z","dependencies_parsed_at":"2023-07-21T11:01:48.075Z","dependency_job_id":null,"html_url":"https://github.com/heresy/angular2-social-login","commit_stats":null,"previous_names":["heresy/angular2-social-login"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heresy%2Fangular2-social-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heresy%2Fangular2-social-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heresy%2Fangular2-social-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heresy%2Fangular2-social-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heresy","download_url":"https://codeload.github.com/heresy/angular2-social-login/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249514386,"owners_count":21284533,"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","angular2","angular2-social-login","angular4","angular4-social-login","social-login"],"created_at":"2024-11-09T03:35:56.614Z","updated_at":"2025-04-18T15:33:30.845Z","avatar_url":"https://github.com/heresy.png","language":"TypeScript","readme":"# angular2-social-login\nSimple client side social authentication for Angular2 application based on our previous angular1's angularjs-social-login plugin.\n\nSupported sites:\n- Google\n- Facebook\n- LinkedIN\n\n## Getting started\n### Installation\n\n#### via npm\n\n```shell\nnpm install angular2-social-login --save\n```\n### Adding angular2-social-login to your project\nAdd `map` for **`angular2-social-login`** in your `systemjs.config`\n```javascript\n'angular2-social-login': 'node_modules/angular2-social-login/dist/bundles/angular2-social-login.min.js'\n```\n### Main module configuration\n```javascript\nimport { NgModule }      from '@angular/core';\nimport { AppComponent } from './app.component';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { Angular2SocialLoginModule } from \"angular2-social-login\";\n\nlet providers = {\n    \"google\": {\n      \"clientId\": \"GOOGLE_CLIENT_ID\"\n    },\n    \"linkedin\": {\n      \"clientId\": \"LINKEDIN_CLIENT_ID\"\n    },\n    \"facebook\": {\n      \"clientId\": \"FACEBOOK_CLIENT_ID\",\n      \"apiVersion\": \"\u003cversion\u003e\" //like v2.4\n    }\n  };\n\n@NgModule({\n  imports: [ \n              BrowserModule,\n              Angular2SocialLoginModule\n          ],\n  declarations: [AppComponent],\n  bootstrap: [ AppComponent ]\n})\nexport class AppModule { \n  constructor(){}\n}\n\nAngular2SocialLoginModule.loadProvidersScripts(providers);\n```\n### Component configuration for `login()` and `logout()`:\nFor `login(provider: string)` provider is required it should be anyone(case-sensitive) \"facebook\", \"google\", \"linkedin\" .\n```javascript\n...\nimport { AuthService } from \"angular2-social-login\";\n...\n@Component({\n    ...\n})\nexport class AppComponent implements OnDestroy {\n  ...\n  constructor(public _auth: AuthService){ }\n  \n  signIn(provider){\n    this.sub = this._auth.login(provider).subscribe(\n      (data) =\u003e {\n                  console.log(data);\n                  //user data\n                  //name, image, uid, provider, uid, email, token (accessToken for Facebook \u0026 google, no token for linkedIn), idToken(only for google)\n                }\n    )\n  }\n\n  logout(){\n    this._auth.logout().subscribe(\n      (data)=\u003e{//return a boolean value.}\n    )\n  }\n\n  ...\n\n}\n```\nFor example please visit https://github.com/heresy/angular2-social-login-example\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheresy%2Fangular2-social-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheresy%2Fangular2-social-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheresy%2Fangular2-social-login/lists"}