Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6958805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:11:18+00:00 2026-05-27T15:11:18+00:00

I have a custom auth provider working against a REST API and now want

  • 0

I have a custom auth provider working against a REST API and now want to implement Remember Me functionality.

Here’s what I have in Config.groovy:

grails.plugins.springsecurity.providerNames = [
   'zubAuthenticationProvider',
   'rememberMeAuthenticationProvider'
]
grails.plugins.springsecurity.auth.loginFormUrl="/login"
grails.plugins.springsecurity.rememberMe.cookieName="example1"
grails.plugins.springsecurity.rememberMe.key="example1"

I can’t see the peristent cookie actually being set on successful login. Am I missing something in config?

** UPDATE **
I can get a cookie to be created if I add:

grails.plugins.springsecurity.rememberMe.persistent = true

But, that just leads to another problem of not using a database for login storage.

Thanks in advance,
Todd

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:11:18+00:00Added an answer on May 27, 2026 at 3:11 pm

    For posterity sake, I’m going with the following–

    Config.groovy

    grails.plugins.springsecurity.providerNames = [
       'zubAuthenticationProvider',
       'rememberMeAuthenticationProvider'
    ]
    
    grails.plugins.springsecurity.rememberMe.cookieName="stackoverflow"
    grails.plugins.springsecurity.rememberMe.key="_grails_"
    grails.plugins.springsecurity.rememberMe.rememberMe.persistent = true
    

    conf/spring/resources.groovy

    userDetailsService(com.zub.security.EgUserDetailsService) {
       grailsApplication = ref('grailsApplication')
    }
    tokenRepository(com.zub.security.EgPersistentTokenRepository) {
        grailsApplication = ref('grailsApplication')
    }
    
    def conf = SpringSecurityUtils.securityConfig
    rememberMeServices(PersistentTokenBasedRememberMeServices) {
        userDetailsService = ref("userDetailsService")
        key = conf.rememberMe.key
        cookieName = conf.rememberMe.cookieName
        alwaysRemember = conf.rememberMe.alwaysRemember
        tokenValiditySeconds = conf.rememberMe.tokenValiditySeconds
        parameter = conf.rememberMe.parameter
        useSecureCookie = conf.rememberMe.useSecureCookie // false
    
        tokenRepository = ref('tokenRepository')
        seriesLength = conf.rememberMe.persistentToken.seriesLength // 16
        tokenLength = conf.rememberMe.persistentToken.tokenLength // 16
    }
    

    EgPersistentTokenRepository is based on GormPersistentTokenRepository but has been updated to make REST calls for CRUD functionality rather than GORM.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have custom errors configured in my web.config, but IIS 6.0 is returning the
I have custom classes that I currently instantiate within App.xaml as resources. I want
Here's what I have: Custom-made C# CMS where the content is stored in a
I have a working custom login realm (provided by a third-party) for Glassfish 3.1.1.
This is making me crazy... I'm trying to have a custom WCF auth token
We have a custom javax.security.auth.spi.LoginModule used for web services as well as some web
I have a custom plugin (I didn't write it) that is not working on
I have a portion of my site that has a lightweight xml/json REST API.
I have a custom Action Helper that is working fine. It's generating a dynamic
I have looked at nearly every single WCF Rest PUT/POST issues on SO here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.