Hey there!
I’ve got a RedwoodJS application built using dbAuth and I have a couple questions that I can’t find anything about in the docs.
- Is there a way to update the cookie’s expiration whenever a user makes a request, so that it only expires after the user has been inactive for some amount of time?
- Right now, whenever the cookie is expired, it just throws this error in the API and returns a 500:
Error: Exception in getAuthenticationContext: The
Authorization header is not valid.
Typically I would expect this to return a 401 or similar so that I could catch that in the web side and log out the user, but I don’t see a way to change this behavior. Is there any advice for this??
1 Like
Hello.
I have the same question. If I am using the app and the cookie expires, the next request response is :
The interface then shows an error message like this :

Is there any way to logout the user automatically and display a message (something like : “you have been automatically logged out, please log in again”).
Did you manage to do this since you posted this question?
Thanks by advance for your help.
Hey @Babouinette,
Sorry for the late reply, I completely missed the email notification for this. 
I have not figured this out yet unfortunately, it hasn’t ended up being a high priority for the app that I’m building. It’s still in the backlog, though, so if I figure it out I’ll report back here! Please do the same if you figure it out in the meantime!