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

IDP not authenticated while SP is, on external SAMP2p #5

Closed
binbsr opened this issue Sep 3, 2018 · 2 comments
Closed

IDP not authenticated while SP is, on external SAMP2p #5

binbsr opened this issue Sep 3, 2018 · 2 comments
Labels

Comments

@binbsr
Copy link

binbsr commented Sep 3, 2018

I am just using the sample repo (No customization) given here with demo license. Got interesting behavior of IDP.
Steps:

  1. Navigate to SP (port 5001)
  2. Navigate to login page and click external SAML2p
  3. Its redirects us to idp (port 5000) login page and enter credentials (alice-alice)
  4. Upon clicking login, it redirect back to sp page, SP is logged in
  5. Navigate to idp and no track of just logged in user alice ("idsrv" cookie is there but no "idsrv.session")

Following is the log of IDP, moment before it says logged in and after navigating/refreshing the idp page, its unauthenticated.
samlpluginbug
@scottbrady91 Any insight on this please.

@scottbrady91
Copy link
Contributor

It's because both IdentityServer instances are running on localhost, and since they're using the same cookie names, they are overwriting each other's cookies.

I've changed the name of the IdP cookie to demo that functionality: https://github.com/RockSolidKnowledge/Samples.IdentityServer4.Saml2pIntegration/blob/57568185fc3cf6560f0541f54c57dfcf00fc67a5/idp/Startup.cs#L60

@binbsr
Copy link
Author

binbsr commented Sep 3, 2018

Thanks @scottbrady91, Your change worked. I though port numbers would make difference for cookie management but seems it just goes for host name.

@binbsr binbsr closed this as completed Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants