This setup is based on how Rails does that. See more about it here: https://github.com/plataformatec/devise/pull/5014