{"id":18064964,"url":"https://github.com/kevinedry/bindid-react","last_synced_at":"2025-07-22T16:05:11.840Z","repository":{"id":217783848,"uuid":"352342637","full_name":"KevinEdry/bindid-react","owner":"KevinEdry","description":null,"archived":false,"fork":false,"pushed_at":"2021-06-22T15:11:56.000Z","size":368,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T06:18:19.632Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/KevinEdry.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-28T13:53:28.000Z","updated_at":"2021-06-22T15:11:59.000Z","dependencies_parsed_at":"2024-01-18T08:29:57.660Z","dependency_job_id":"b3b2485a-e90f-4a47-9ae1-74d7e946e59f","html_url":"https://github.com/KevinEdry/bindid-react","commit_stats":null,"previous_names":["kevinedry/bindid-react"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KevinEdry/bindid-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinEdry%2Fbindid-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinEdry%2Fbindid-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinEdry%2Fbindid-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinEdry%2Fbindid-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KevinEdry","download_url":"https://codeload.github.com/KevinEdry/bindid-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinEdry%2Fbindid-react/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266524869,"owners_count":23942832,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-31T06:08:37.946Z","updated_at":"2025-07-22T16:05:11.790Z","avatar_url":"https://github.com/KevinEdry.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bindid-react\nPlease follow the [BindID Documentation](https://developer.bindid.io/docs/api/rest/topics/oidcAPIs/authorizationAPI/authorization_api) for further instructions\n\n\u003e easy intergration for a native react component with bindid\n\n[![NPM](https://img.shields.io/npm/v/bindid-react.svg)](https://www.npmjs.com/package/bindid-react) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Install\n\n```bash\nnpm install --save bindid-react\n```\n\n## Usage\n\n### BindIDProvider\nThe BindIDProvider is responsible for initializing the BindID SDK. This can be used in a high order component and should receive the following parameters:\n|Parameter| Type | Required\n|--|--|--|\n| clientId | string |\t✓ |\n| apiCompat | `latest` or `api-level-1` as string |✘ |\n| disableStateValidation |boolean  |✘\t |\n\nAnd the implementation as follows:\n```jsx\nimport React, { Component } from 'react'\nimport { BindIDProvider } from 'bindid-react'\n\nclass Example extends Component {\n  render() {\n    return (\n      \u003cBindIDProvider clientId=\"YOUR_CLIENT_ID\"\u003e\n      \u003c/BindIDProvider\u003e\n    )\n  }\n}\n```\n\n\n### LoginButton\nThe Login Button component is what the user sees in order to start the authentication process. it ships with a default UI that can be changed by pass `style` or a `className` parameter, you also will have to pass to it an `options` object with a redirect URI parameter.\n\nThe LoginButton can accept these parameters:\n|Parameter| Type | Required\n|--|--|--|\n| options | object |\t✓ |\n| onCompleted | function |✘ |\n| onError |function  |✘\t |\n| className |string  |✘ |\n| style |object  |✘|\n\nThe `options` object as follows:\n|Parameter| Type | Required\n|--|--|--|\n| redirectUri | string |\t✓ |\n| scope | array of strings |✘ |\n| verifications | array  |✘\t |\n| otherLoginOptions | object  |✘ |\n| customMessage | string  |✘|\n\nThe `LoginButton` component Implementation:\n\n```jsx\nimport React, { Component } from 'react'\nimport { BindIDProvider, LoginButton } from 'bindid-react'\n\nclass Example extends Component {\n  render() {\n    const options = {\n      redirectUri: 'YOUR_REDIRECT_URI',\n    }\n    \n    return (\n      \u003cBindIDProvider clientId=\"YOUR_CLIENT_ID\"\u003e\n        \u003cLoginButton options={options}/\u003e\n      \u003c/BindIDProvider\u003e\n    )\n  }\n}\n```\n\nThe default `LoginButton` component styling will look like this:\n\u003cbr/\u003e\n![enter image description here](https://i.imgur.com/HaqhSbx.png)\n\n## License\n\nMIT © [KevinEdry](https://github.com/KevinEdry)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinedry%2Fbindid-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinedry%2Fbindid-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinedry%2Fbindid-react/lists"}