PHPackages                             dasundev/nova-access-secret - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. dasundev/nova-access-secret

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

dasundev/nova-access-secret
===========================

Secure your Laravel Nova access with a required secret key in the URL.

v1.0.0(2y ago)13671[1 issues](https://github.com/dasundev/nova-access-secret/issues)MITPHPPHP ^8.1

Since Feb 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/dasundev/nova-access-secret)[ Packagist](https://packagist.org/packages/dasundev/nova-access-secret)[ GitHub Sponsors](https://github.com/dasundev)[ RSS](/packages/dasundev-nova-access-secret/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Nova Access Secret
==================

[](#nova-access-secret)

 [![Total Downloads](https://camo.githubusercontent.com/dc65d24f54580d8138902c38b80a681ac46ef4d7d680b7a6de775aa69a13328b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646173756e6465762f6e6f76612d6163636573732d736563726574)](https://packagist.org/packages/dasundev/nova-access-secret) [![Latest Stable Version](https://camo.githubusercontent.com/17c4d1449696a9a53495bdd05a512f72d77395b493c1928b070ef2434b192738/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646173756e6465762f6e6f76612d6163636573732d736563726574)](https://packagist.org/packages/dasundev/nova-access-secret) [![License](https://camo.githubusercontent.com/150a1ae688fe06b12ba8c7e65efa10c95e1c71b1d385e9b561b2773ac6fe1c29/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646173756e6465762f6e6f76612d6163636573732d736563726574)](https://packagist.org/packages/dasundev/nova-access-secret)

✨ Introduction
--------------

[](#-introduction)

This package provides a middleware for securing access to Nova by requiring a secret key to be provided in the URL.

🔍 How it Works
--------------

[](#-how-it-works)

Once you've set up and configured this package, it works by preventing access to `http://my-website.com/nova`.

If you try to visit that link, you'll see a **"404"** message.

But if you add the secret key at the end of the URL like this: `http://my-website.com/nova/secret`, you'll be able to access the Nova login page.

> This functionality is facilitated through a specific type of cookie working behind the scenes. This cookie validates whether you possess the authorization to access the Nova login page.

📦 Installation
--------------

[](#-installation)

You can install the package via Composer:

```
composer require dasundev/nova-access-secret
```

Optionally, you can publish the config file using:

```
php artisan vendor:publish --tag="nova-access-secret-config"
```

👩‍💻 Usage
---------

[](#‍-usage)

After installing the package, open the .env file and add the following key with your secret key:

```
NOVA_ACCESS_SECRET_KEY=secret
```

To access Nova, append the secret key to the Nova URL like this:

```
https://my-website.com/nova/secret

```

Now, your Nova access is secured with the provided secret key.

> If you want to disable the secret access, simply keep the NOVA\_ACCESS\_SECRET\_KEY value empty or delete the key from the .env file.

🔐 Enhance Security
------------------

[](#-enhance-security)

To enhance security, you have the option to include your own cookie class through the configuration file.

```
