2.3 KiB
GCAuth OAuth
The in-game login system for Grasscutter is based on oauth and GCAuth.
Current Features:
- Use twitter oauth to login
- Error page
Important Notes:
This plugin is made to run on the current Development branch of Grasscutter. \
This plugin is in very early development and only have the backend now. Frontend is extermely hardcore.
Setup
Download Plugin Jar
See releases.
Compile yourself
- Pull the latest code from github using
git clone https://github.com/Xtao-Team/GCAuth-OAuth
in your terminal of choice. - Locate your grasscutter server and copy the
grasscutter
server jar into the newly createdGCAuth-OAuth/lib
folder - Navigate back into the project root folder called
GCAuth-OAuth
folder and rungradlew build
(cmd) or./gradlew build
(Powershell, Linux & Mac). - Assuming the build succeeded, in your file explorer navigate to the
GCAuth-OAuth
folder, you should have agcauth_oauth.jar
file, copy it. - Navigate to your
Grasscutter
server, find theplugins
folder and paste thegcauth_oauth.jar
into it. - Start your server.
...Jump to next section...
Usage
-
Put the all the frontend files into the folder
GRASSCUTTER_RESOURCE/plugins/GCAuth/OAuth
. Note that your must havelogin.html
for now. You are free to put any other dynamiclly loaded file(e.g..js
,.css
) in that folder. Check the last section for current available frontend. -
Put the
gcauth.jar
file into theplugins
folder of your grasscutter server. GCAuth -
Log in to your server and you should be able to log in with Twitter account. (make sure
webapi-os.account.hoyoverse.com
is in your proxy list)
Your final plugins' folder's directory structure should look similar to this
plugins
│ gcauth.jar
│ gcauth_oauth.jar
│ ...
└───GCAuth
│ config.json
└───OAuth
│ login.html
│ ...
Frontend
- Login page
- Error page