AzerothCore integration in Strapi CMS.
Install the plugin in your Strapi project:
# using npm
npm install strapi-azerothcore
# using yarn
yarn add strapi-azerothcore
Using a text/code editor, open config/plugins.js
(or config/plugins.ts
if applicable), add a "strapi-azerothcore"
object with an enabled
property set to true
:
module.exports = ({ env }) => ({
// ...
"strapi-azerothcore": {
enabled: true,
},
// ...
});
After installing the plugin, you must rebuild the admin dashboard for it to include the plugin.
Use the build
script to rebuild Strapi, or use develop
if you'd like to start it as well:
# using npm
npm run build
# or
npm run develop
# using yarn
yarn build
# or
yarn develop
The AzerothCore plugin should now appear in the left pane of your Strapi dashboard:
In the leftmost pane of the Strapi dashboard, go to "AzerothCore", then "General" under the Settings category
In the leftmost pane of the Strapi dashboard, go to "AzerothCore", then "Realms" under the Settings category
This is where you define your different realms.
Typically you need to have one entry for each row in the realmlist
table of your acore_auth
database.
You can click the "➕ Create realm" button on the top right corner of the page to add an entry, click one of the table's rows to edit an entry, or click the 🗑️ button on the right to delete an entry.
Each entry has the following settings:
3306
acore_characters
You can press the "🔌 Test Connection" button to ensure Strapi is able to connect to your database properly.
worldserver
is running.SOAP.IP
in your worldserver.conf
.worldserver
is listening for SOAP connections, usually 7878
.SOAP.Port
in your worldserver.conf
.3
:
worldserver
console:account create soap mypassword
(change soap
and mypassword
to your liking, they are the account name and password, respectively)3
for your SOAP account by typing this command in the worldserver
console:account set gmlevel soap 3 -1
(change soap
to the name of your SOAP account)You can press the "🔌 Test Connection" button to ensure Strapi is able to connect to your AzerothCore server via SOAP properly.
In the leftmost pane of the Strapi dashboard, go to "AzerothCore", then "Auth Database" under the Settings category
3306
acore_auth
You can press the "🔌 Test Connection" button to ensure Strapi is able to connect to your database properly.
In the leftmost pane of the Strapi dashboard, go to "AzerothCore", then "Permissions" under the Settings category
This page displays permission issues that would prevent standard usage of the AzerothCore plugin. Press the "🔨 Fix" button to fix the permissions.
Feel free to ignore the recommendations on this page if you know what you're doing and would like to disable some of the plugin's features via the permissions system.
In the leftmost pane of the Strapi dashboard, go to "⚙️ Settings", then visit the links under the "Users & permissions plugin" section:
This section allows you to manage which API endpoints are accessible for logged-in users ("Authenticated" role) and unauthenticated users ("Public" role).
You can customize the emails sent to your users here.
Make sure to change the "Reset password page" and "Redirection url" links:
reset-password
API endpoint.Your frontend can query the following API endpoints:
Register
POST /api/strapi-azerothcore/auth/register
{
"username": "myaccount",
"email": "user@test.com",
"password": "mypassword",
"repeatPassword": "mypassword"
}
Login
POST /api/strapi-azerothcore/auth/login
{
"identifier": "myaccount",
"password": "mypassword"
}
You can also use the email address to log in:
{
"identifier": "user@test.com",
"password": "mypassword"
}
Example response:
{
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NzMsImlhdCI6MTcxOTE1MTY0MiwiZXhwIjoxNzIxNzQzNjQyfQ.IoEBek2debDordaC0y1X_mlksjFPx_roi-BoJUeYfIg",
"user": {
"id": 73,
"username": "myaccount",
"email": "user@test.com",
"provider": "local",
"confirmed": true,
"blocked": false,
"createdAt": "2024-06-20T10:51:14.841Z",
"updatedAt": "2024-06-20T10:51:14.841Z"
}
}
Use the provided jwt
in the Authorization
header (Authorization: Bearer <your jwt>
without the brackets) for the endpoints that need authentication.
Forgot Password
POST /api/auth/forgot-password
This will send an email to the provided email address if a user is found. The email will contain a link with a code
as a query parameter (?code=xxxxx
) which is needed for the reset-password
endpoint.
{
"email": "user@test.com"
}
Reset Password
POST /api/strapi-azerothcore/auth/reset-password
{
"code": "xxxxxxxxxxxxxxxxxxxxxxx",
"password": "mynewpassword",
"passwordConfirmation": "mynewpassword"
}
The code
is from a link sent via email when using the reset-password
endpoint.
password
is the new password to set, and passwordConfirmation
must be the value of a "repeat password" field in the form on your frontend.
Change Password
POST /api/strapi-azerothcore/auth/change-password
🔐 Requires authentication
{
"currentPassword": "password",
"password": "mynewpassword",
"passwordConfirmation": "mynewpassword"
}
Change Email
POST /api/strapi-azerothcore/auth/change-email
🔐 Requires authentication
{
"email": "newuser@test.com"
}
My Characters
GET /api/strapi-azerothcore/characters/:realmId/my-characters
🔐 Requires authentication
Returns data about the account's characters for a given realm
My Guilds
GET /api/strapi-azerothcore/characters/:realmId/my-guilds
🔐 Requires authentication
Returns data about the account's owned guilds for a given realm
/api/strapi-azerothcore/realms
/api/strapi-azerothcore/user-activity
Contributions are greatly appreciated.
If you have a suggestion that would make this project better, feel free to fork the repository and create a Pull Request. You can also open a Feature Request.
⭐️ Give the project a star if you like it!
#web
channel if you'd like to discuss this pluginroboto_