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

Support Login Hint for SAML login #3522

Open
inker-kuo opened this issue Jan 21, 2025 · 1 comment
Open

Support Login Hint for SAML login #3522

inker-kuo opened this issue Jan 21, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@inker-kuo
Copy link

Please check if your Feature Request has not been already raised in the Discussions Tab, as we would like to reduce duplicates. If it has been already raised, simply upvote it 🔼.

Is your proposal related to a problem?

I checked from the code here that the SAML login don't work with login_hint field:

if (login_hint) {

Can we support it?
My example local setup with NextAuth is

	BoxyHQSAMLProvider({
		authorization: { params: { scope: '' } },
		issuer: "https://xxx.xxx.xxx",
		clientId: "dummy",
		clientSecret: "dummy",
	  }),

Describe the solution you'd like

Can signIn by passing the login_hint in as the following NextAuth example code:

signIn(
  provider.id,
  { callbackUrl: '/' },
  { tenant, product, login_hint: email },
);

And the IdP side can automatically fill it into their login page.

Describe alternatives you've considered

N/A

Additional context

N/A

@inker-kuo inker-kuo added the enhancement New feature or request label Jan 21, 2025
@niwsa
Copy link
Member

niwsa commented Jan 21, 2025

@inker-kuo Thanks for creating this issue. Seems like there is no built in support for login_hint under SAML. We might need to look into other options like using relayState for this.

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

No branches or pull requests

2 participants