Pergunta

I integrated the spring-security-oauth plugin into my app, and the login over FB or Google seems to be working fine.

The problem I have now, is that the authentication expires along with the tomcat session, which is not what it should be. I want the OAuth-authentication to be persistent on client's machine. Some sort of spring security's remember-me functionality is needed.

Is there a possibility to activate it out-of-box?

TIA

Foi útil?

Solução 2

so, after doing some research and talking the plugin creator here http://github.com/enr/grails-spring-security-oauth/issues/9, the solution was found. It will be available in the upcoming release, or you can do it yourself

Outras dicas

I have this setup in my application. What you want to do is enable rememberme configuration:

http://grails-plugins.github.io/grails-spring-security-core/docs/manual/guide/single.html#rememberMeCookie

run the s2-create-persistent-token script

In config file:
rememberMe.alwaysRemember = true // by default it is false
rememberMe.persistent = true // by default it is off

I don't have my application on hand but if you need exact configs, let me know and I'll post it up later for you.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top