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

Set <saml:Subject> on AuthnRequest #285

Open
suchitagarwal opened this issue Jun 1, 2018 · 2 comments
Open

Set <saml:Subject> on AuthnRequest #285

suchitagarwal opened this issue Jun 1, 2018 · 2 comments

Comments

@suchitagarwal
Copy link

In my flow, a user first enters their email on my website, and then, if they are eligible to use SSO, are redirected to the IdP. However, the user has to re-enter their email on the IdP if they are not logged in. I know that AuthnRequest has a field <saml:Subject> that can be used to give the IdP a hint on what email id to use, but I couldn’t find a way to set it on the request using passport-saml. Am I missing something or is this not supported yet?

@markstos
Copy link
Contributor

markstos commented Aug 3, 2018

No one is monitoring the issue queue for questions. Try the power of grep to search the source code for AuthnRequest and Subject to see what you find. If this is a spec-compliant feature that we don't implement yet, a PR is welcome.

@rubicola
Copy link

rubicola commented Feb 7, 2023

I also wanted this functionality for a multisaml strategy where users enter their email address on my website and then are redirected to a IdP if they are identified as a saml user.

Assuming that your IdP allows for login hints, I was able to pass the email to the Idp to auto-populate the username field, by setting a login hint here:

yield passport.authenticate(
		'saml',
		{
			additionalParams: {
				login_hint: username
			},
		},

where username is the email. I found that it worked for my IdP only if the email address was an existing user in the idp.

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

No branches or pull requests

3 participants