{"id":17715650,"url":"https://github.com/jmjuanes/electron-auth","last_synced_at":"2025-04-21T03:32:18.375Z","repository":{"id":57221527,"uuid":"87590871","full_name":"jmjuanes/electron-auth","owner":"jmjuanes","description":"A dead simple electron library to handle the OAuth authentication for some providers","archived":false,"fork":false,"pushed_at":"2017-08-02T21:26:51.000Z","size":10,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-12T22:28:21.469Z","etag":null,"topics":["electron","electron-plugin","oauth-client"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/electron-auth","language":"JavaScript","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/jmjuanes.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}},"created_at":"2017-04-07T22:13:51.000Z","updated_at":"2024-01-14T17:40:50.000Z","dependencies_parsed_at":"2022-08-29T02:13:00.065Z","dependency_job_id":null,"html_url":"https://github.com/jmjuanes/electron-auth","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmjuanes%2Felectron-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmjuanes%2Felectron-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmjuanes%2Felectron-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmjuanes%2Felectron-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmjuanes","download_url":"https://codeload.github.com/jmjuanes/electron-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249991125,"owners_count":21357204,"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":["electron","electron-plugin","oauth-client"],"created_at":"2024-10-25T12:06:37.133Z","updated_at":"2025-04-21T03:32:18.158Z","avatar_url":"https://github.com/jmjuanes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-auth\n\n[![npm](https://img.shields.io/npm/v/electron-auth.svg?style=flat-square)](https://www.npmjs.com/package/electron-auth)\n[![npm](https://img.shields.io/npm/dt/electron-auth.svg?style=flat-square)](https://www.npmjs.com/package/electron-auth)\n[![npm](https://img.shields.io/npm/l/electron-auth.svg?style=flat-square)](https://github.com/jmjuanes/electron-auth)\n\n\u003e A dead simple electron library to handle the OAuth authentication for some providers\n\n**NOTE**: More authorization providers and documentation are in progress. Interested in contribute? You are welcome :smile:\n\n## Installation \n\n```\nnpm install --save electron-auth\n```\n\n## Usage \n\n```javascript\n//Import dependencies\nvar app = require('electron').app;\nvar auth = require('electron-auth');\n\n//Initialize the application\napp.on('ready', function()\n{\n  //Initialize the github auth options\n  var opt = { client_id: 'YOUR_CLIENT_ID', client_secret: 'YOUR_CLIENT_SECRET' };\n\n  //Handle the github authentication\n  return auth(auth.providers.github, opt, function(error, token)\n  {\n    //Do your magic with the token \n    //....\n  });\n});\n```\n\n## API \n\n#### auth(provider, options, callback)\n\nPerform the user authentication for the desired provider. This method accepts the following arguments: \n\n- `provider`: an object with the information about the provider. You can use the built-in providers or use a custom provider. \n- `options`: an object with the options. \n- `callback`: a function that will be executed when the authentication is done or when there is an error during the process of authentication.\n\n## Providers \n\nAll the supported providers are stored in `auth.providers.PROVIDER_NAME`. You can also use your own provider.\n\n### GitHub\n\nRead more about the GitHub Authentication: https://developer.github.com/v3/oauth/ \n\n\n\n## Related \n\n- [electron-ejs](https://github.com/jmjuanes/electron-ejs): Simple Electron plugin for rendering EJS templates.\n\n## License\n\n[MIT LICENSE](./LICENSE) \u0026copy; Josemi Juanes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmjuanes%2Felectron-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmjuanes%2Felectron-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmjuanes%2Felectron-auth/lists"}