I've deployed my Nova app (which works on my local environment) to Forge and cannot log in. There is no error, the user is just redirected back to the login form.
My nova installation is behind a load balancer
Things I've tried:
Changing the Session driver to cookie
Checked the permissions on the storage folder - a session is created in storage/framework/sessions when I click the remember me option on the form
The user definitely exists, I have checked with tinker and I have also checked the password with Hash::check
So, hmmm, I'm stuck. Any suggestions would be much appreciated.
Authorizing Nova
Within your app/Providers/NovaServiceProvider.php file, there is a gate method. This authorization gate controls access to Nova in non-local environments. By default, any user can access the Nova dashboard when the current application environment is local. You are free to modify this gate as needed to restrict access to your Nova installation:
/**
* Register the Nova gate.
*
* This gate determines who can access Nova in non-local environments.
*
* @return void
*/
protected function gate()
{
Gate::define('viewNova', function ($user) {
return in_array($user->email, [
'[email protected]',
]);
});
}
BTW - just a quick note for anyone else looking here. When you're setting your trusted proxies make sure that you're setting the internal IP address of your load balancer (the one that the app server will receive the traffic from) not the public one.