Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dasundev/nova-access-secret
Secures access to Nova by requiring a secret key in the URL.
https://github.com/dasundev/nova-access-secret
laravel nova
Last synced: 2 months ago
JSON representation
Secures access to Nova by requiring a secret key in the URL.
- Host: GitHub
- URL: https://github.com/dasundev/nova-access-secret
- Owner: dasundev
- License: mit
- Created: 2024-02-20T15:20:04.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-21T08:18:18.000Z (11 months ago)
- Last Synced: 2024-10-17T19:21:46.419Z (3 months ago)
- Topics: laravel, nova
- Language: PHP
- Homepage:
- Size: 51.8 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
Nova Access Secret
## ✨ 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
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
You can install the package via Composer:
```bash
composer require dasundev/nova-access-secret
```Optionally, you can publish the config file using:
```bash
php artisan vendor:publish --tag="nova-access-secret-config"
```
## 👩💻 UsageAfter installing the package, open the .env file and add the following key with your secret key:
```dotenv
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
To enhance security, you have the option to include your own cookie class through the configuration file.```php
MyAccessSecretCookie::class
];```
## 🔄 Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## 🤝 Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.