spring-projects / spring-projects/spring-security

Kotlin DSL loginPage usage

Open
#19,249 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: bug
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Missing Kotlin DSL property for loginPage in oneTimeTokenLogin

Title: Kotlin DSL: Missing loginPage property in oneTimeTokenLogin configurer

Description:

Current Behavior

When configuring One-Time Token (OTT) login using the Spring Security Kotlin DSL, the loginPage property is not directly available as a property assignment (e.g., loginPage = "/login"). Instead, developers must use the it lambda parameter to call the Java-style setter method on the underlying OneTimeTokenLoginConfigurer:

// Current workaround
http.oneTimeTokenLogin {
    it.loginPage("/login")
    it.tokenGenerationSuccessHandler(myHandler)
}

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 the Kotlin DSL oneTimeTokenLogin entry point and the underlying OneTimeTokenLoginConfigurer named in the issue. Compare the existing loginPage configuration with tokenGenerationSuccessHandler, then add coverage for loginPage = "/login". Done means the property assignment configures the same login page as it.loginPage("/login").

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin, spring
Domain
authentication, security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.