Strapi Plugin - Bootstrap admin user

Hello,

I’ve created a strapi plugin, which automatically creates the admin user on the development environment.

The first step verifies if the strapi-super-admin role exists; if it doesn’t exist, it creates one. The second step verifies if the admin user exists; if it doesn’t exist, it creates one with the strapi-super-admin role.

Installation

Yarn

yarn add strapi-plugin-bootstrap-admin-user

npm

npm install strapi-plugin-bootstrap-admin-user

Usage

Credentials will be outputed in console on the First run in the development environment.
image

Default credentials

Username: admin  
Password: admin  
Firstname: Admin  
Lastname: Admin  
Email: admin@strapi.dev

You can also define default credentials in .env with the following variables:

DEV_ADMIN_USERNAME  
DEV_ADMIN_PASSWORD
DEV_ADMIN_FIRSTNAME
DEV_ADMIN_LASTNAME
DEV_ADMIN_EMAIL

Note: Please use it only in the development environment.

Feel free to check it out on npm. Also, feel free to contribute to it on GitHub.

Thanks.

2 Likes

Awesome thank you @sunnyson