Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding the demo validation IDP and the AgID IDP turns every IDP unclickable #120

Open
fautore opened this issue May 27, 2024 · 1 comment · May be fixed by #121
Open

Adding the demo validation IDP and the AgID IDP turns every IDP unclickable #120

fautore opened this issue May 27, 2024 · 1 comment · May be fixed by #121

Comments

@fautore
Copy link

fautore commented May 27, 2024

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?

<SPIDReactButton
    url={`${window.location.protocol}//${window.location.host}/authentication/spid?idp={{idp}}`}
    extraProviders: [{
        entityID: 'https://validator.spid.gov.it',
        entityName: 'VALIDATOR'
    }]
/>

Edit: Did some digging...

The issue seems occuring in ProvidersModal.tsx, line 174 the function isProviderActive 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):

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.

fautore added a commit to fautore/spid-react-button that referenced this issue May 28, 2024
was given using the extraProviders configuration option, this fixes dej611#120
@fautore
Copy link
Author

fautore commented May 28, 2024

Opened a PR to fix, please check!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant