You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "haaah (via GitHub)" <gi...@apache.org> on 2026/07/07 15:12:07 UTC

[I] onInteractiveAuthenticationSuccessEvent is not firing after login [grails-core]

haaah opened a new issue, #15887:
URL: https://github.com/apache/grails-core/issues/15887

   ### Steps to Reproduce
   1. Install spring security core plugin version 4.0.3
   2. Execute `grails s2-quickstart com.yourapp User Role`
   3. Enable security event listener and turn on both onAuthenticationSuccessEvent and onInteractiveAuthenticationSuccessEvent callback within application.groovy
   
   **application.groovy**
   ```
   // Added by the Spring Security Core plugin:
   grails.plugin.springsecurity.userLookup.userDomainClassName = 'iam.User'
   grails.plugin.springsecurity.userLookup.authorityJoinClassName = 'iam.UserRole'
   grails.plugin.springsecurity.authority.className = 'iam.Role'
   grails.plugin.springsecurity.auth.loginFormUrl = '/#/login'
   grails.plugin.springsecurity.rest.token.storage.jwt.expiration = 3600             //seconds
   
   //enable event listener
   grails.plugin.springsecurity.useSecurityEventListener = true
   
   grails.plugin.springsecurity.onAuthenticationSuccessEvent = { e, appCtx ->
   	// handle AuthenticationSuccessEvent
   	println("authentication success event")
   }
   
   grails.plugin.springsecurity.onInteractiveAuthenticationSuccessEvent = { e, appCtx ->
   	// handle InteractiveAuthenticationSuccessEvent
   	println("interactive authentication success event")
   }
   ```
   
   ### Expected Behaviour
   1. Login with username and password through `http://localhost:8080/APP/api/login`
   2. Printout both line after authentication went through
       - "authentication success event"
       - "interactive authentication success event"
   
   
   ### Actual Behaviour
   Printout from console
   ```
   authentication success event
   authentication success event
   authentication success event
   authentication success event
   authentication success event
   authentication success event
   ```
   The line "interactive authentication success event" wasn't printout
   
   ### Environment Information
   OS: Mac BigSur
   Grails: 4.0.4
   JDK: OpenJDK Runtime Environment (Zulu 8.54.0.21-CA-macosx) (build 1.8.0_292-b10)
   Plugin Version: spring-security-core:4.0.3
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@grails.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org