change auth endpoints

This commit is contained in:
SpikeHD 2022-05-02 19:50:49 -07:00
parent 344fcddb88
commit 574b2f4f09
5 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,5 @@
{
"applicationId": "js.grassclipper.app",
"version": "0.8.5",
"version": "0.8.6",
"resourcesURL": "https://github.com/Grasscutters/GrassClipper/releases/latest/download/resources.neu"
}

View File

@ -1,6 +1,6 @@
{
"applicationId": "js.grassclipper.app",
"version": "0.8.5",
"version": "0.8.6",
"defaultMode": "window",
"port": 0,
"documentRoot": "/resources/",

View File

@ -1,6 +1,6 @@
{
"name": "grassclipper",
"version": "0.8.5",
"version": "0.8.6",
"repository": "https://github.com/Grasscutters/GrassClipper.git",
"author": "SpikeHD <spikegdofficial@gmail.com>",
"license": "Apache-2.0",

View File

@ -298,9 +298,9 @@ async function openLogin() {
// Check if we even need to authenticate
try {
const { data } = await axios.get(url + '/grasscutter/auth_status')
const { data } = await axios.get(url + '/authentication/type')
if (data?.message !== 'AUTH_ENABLED') {
if (!data.includes('GCAuthAuthenticationHandler')) {
launchPrivate()
return
}
@ -309,7 +309,6 @@ async function openLogin() {
return
}
loginIpDisplay.innerText = ip
registerIpDisplay.innerText = ip

View File

@ -62,7 +62,7 @@ async function login() {
password,
}
const { data } = await axios.post(url + '/grasscutter/login', reqBody)
const { data } = await axios.post(url + '/authentication/login', reqBody)
switch(data.message) {
case 'INVALID_ACCOUNT':
@ -117,7 +117,7 @@ async function register() {
password_confirmation
}
const { data } = await axios.post(url + '/grasscutter/register', reqBody)
const { data } = await axios.post(url + '/authentication/register', reqBody)
switch(data.message) {
case 'USERNAME_TAKEN':