The basic difference is that render
will simply render the passed in template for whatever route the user landed on when the before hook was called, and redirect
will change the route and render the template associated with the new route.
You can use either...just depends on what you want to accomplish. Sometimes you might want to allow the user to sign in from any page and then stay on that page...so, you would use a render
. Other times, you want to send them to a sign-in route and then direct them to specific route following a successful sign-in...in that case, you'd perform a redirect
.
Clear as mud?