ory / ory/polis

Support Login Hint for SAML login

Open
#3,522 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
2.3k
Forks
233
PR merge metrics
No merged PRs in 30d

Description

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:
https://github.com/boxyhq/jackson/blob/7576341eaec09573118d73f3460b5ea707974888/npm/src/controller/oauth.ts#L492
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at npm/src/controller/oauth.ts around line 492 and trace how SAML login parameters are handled. Verify the path used by the NextAuth signIn example, then ensure login_hint can reach the identity provider so its login page can prefill the value.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, nodejs, typescript
Domain
authentication
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.