Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Ability to store plugin license keys in .env file #4393

Closed
monachilada opened this issue Jun 11, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@monachilada
Copy link
Contributor

commented Jun 11, 2019

Description

For security reasons, it would be nice to be able to keep my plugin licenses stored in my .env files and out of the project.yaml file in my repo. Currently it's only possible to have the license defined explicitly in the project config file.

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

This is possible with the CRAFT_LICENSE_KEY PHP constant.

.env:

LICENSE_KEY="#########..."

web/index.php (after loading .env):

define('CRAFT_LICENSE_KEY', getenv('LICENSE_KEY'));
@monachilada

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

This is possible with the CRAFT_LICENSE_KEY PHP constant.

For the Craft license sure, but I was talking about specific 3rd party plugin licenses.

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

Sorry, somehow I missed that!

@brandonkelly

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

Just added the ability to set plugin license keys to environment variables using the $VARIABLE_NAME syntax, for the next release. If you do, they will be saved to your project.yaml file the same way, so the license key won’t make it into your repo.

@monachilada

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

Fantastic, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.