dej611 / dej611/spid-react-button
Adding the demo validation IDP and the AgID IDP turns every IDP unclickable
- Dominant language
- TypeScript
- Stars
- 20
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
first of all, thank you so much for the work on this repo,
as the title says, I integrated the button in a react application, all is working fine, but when it comes to adding the AgID IDP for validation (https://validator.spid.gov.it/) using the `extraProviders` configuration option turns Every IDP button (including the new one) unclickable.
Any suggestions on how to fix? is the configuration (down here) i'm using wrong by any means?
```jsx
```
# Edit: Did some digging...
The issue seems occuring in [ProvidersModal.tsx, line 174](https://github.com/dej611/spid-react-button/blob/90209ad1a3028e3a04ee2a143dcc7fe396c0f4e6/src/modalVariant/ProvidersModal.tsx#L174) the function [`isProviderActive`](https://github.com/dej611/spid-react-button/blob/90209ad1a3028e3a04ee2a143dcc7fe396c0f4e6/src/shared/utils.ts#L66) correctly acknowledges that the idp is an extra provider, BUT the first theck `supported.indexOf(idp.entityID)` returns false.
supported is a list of entities that are registered Identity Providers (e.g. list at time of writing):
```js
supported: [
"https://identity.sieltecloud.it",
"https://spid.intesa.it",
"https://identity.infocert.it",
"https://id.lepida.it/idp/shibboleth",
"https://spid.register.it",
"https://login.id.tim.it/affwebservices/public/saml2sso",
"https://posteid.poste.it",
"https://loginspid.aruba.it",
"https://idp.namirialtsp.com/idp"
"https://spid.teamsystem.com/idp"
]
```
Obviously, my extra provider is NOT on the list, hence why the `isProviderActive` function returns false even when the provider is a custom one.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.