-
Notifications
You must be signed in to change notification settings - Fork 97
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
Verifying a new user account does not unlock that account. #108
Comments
For quick reference, here is my integration test.
|
Interestingly, the test passes if I call uiRegistrationCodeStrategy.finishRegistration explicitly:
|
The good news is that the code which unlocks a user's account upon successful verification is working properly. I believe the issue here is specific to the use of an integration test to test controllers. According to the documentation:
More information is available at https://docs.grails.org/3.3.8/guide/testing.html#functionalTesting Does your test work if you convert it to a functional test? Also, please note that the url utilized by the You are using:
but it should be
|
I've updated the test in my demo project, but I get the same result. I changed both the url as you suggested, and turned the integration test into a functional one. |
@ddelponte and @spierepf I've noticed the same problem on a new application that used the plugin. The problem was that I haven't create in my app the necessary default |
Steps to Reproduce
I've created a demo grails app that uses spring-security-ui and contains a failing integration test that I would expect to pass.
$ grails test-app
Expected Behaviour
The test creates a User object with a registration token. That User object has the accountLocked field set to true (which corresponds to the state of that field when a new user account is created through the browser).
I would expect that when the user clicks on the verification link that they receive by email (/registration/verifyRegistration?t=xxxxxxxxxxx) that the accountLocked field would be set to false.
Actual Behaviour
The user is logged in, but their account is still locked, so that future login attempts will fail.
Environment Information
I'm on Windows 10, but I've also tried it on Ubuntu 16.04
$ grails --version
|Grails Version: 3.3.8
|Groovy Version: 2.4.15
|JVM Version: 1.8.0_161
Example Application
https://github.com/spierepf/demo
The text was updated successfully, but these errors were encountered: