Search code examples
grailsspring-securitygrails-plugin

Couldn't able to hit the register page of Spring Security UI


Hi I have installed the spring security UI plugin in my grails app. I'm trying to create the registration page from Facebook registration, rather than from plugins default register page.

I'm decoding the response and getting back the username,email and password.

Now I wish I need to send them to the RegisterController's register action. Like:

 redirect(controller:"register",action:"register",params:[username:username,email:email])

But when I do redirect, I get an 405 error.

But I can see RegisterController in the plugin directory.

What I'm missing here?

Thanks in advance


Solution

  • If you look at the RegisterController what methods are allowed for the register action? A 405 error is method not allowed. Which may mean you a doing a GET on an action that only allows POST.

    Looking at the spring security UI plugin it looks like it is expecting a Post with a command object for that action but if you don't need the user to enter any more details you should be able to just create the user directly from the data you have now.