When doing some tests I reset an account and got this message.
An email has been sent to you with further instructions on how to reset your password.
Then I move to the Login page and that message above still appears.
How to set this flash message stuff to only show one time?
I use this to get flash messages:
func Home(w http.ResponseWriter, r *http.Request) {
// ResponseWriter must be a ClientStateResponseWriter
// ab is *authboss.Authboss
csrw := ab.NewResponse(w)
data := authboss.HTMLData{
"flash_error": authboss.FlashError(csrw, r),
"flash_success": authboss.FlashSuccess(csrw, r),
}
}
Thank you for this great lib!
When doing some tests I reset an account and got this message.
Then I move to the Login page and that message above still appears.
How to set this flash message stuff to only show one time?
I use this to get flash messages:
When I inspect the
FlashSuccess
function I see that the flash message flushed directly withDelSession
: https://github.com/volatiletech/authboss/blob/e62387f74f1fd01cce883130882065b5bb701c8a/client_state.go#L373-L381@aarondl Could you help me with this flash message issue? Thank you.
edit: After more debugging, I find out that my
w
is of typehttptest.ResponseRecorder
.