mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 09:07:48 -04:00
Fix online accounts not being able to login without internet access
This commit is contained in:
parent
ddd9a27cdb
commit
44c12d41f7
@ -3,6 +3,8 @@ package net.kdt.pojavlaunch.authenticator.mojang;
|
|||||||
import android.content.*;
|
import android.content.*;
|
||||||
import android.os.*;
|
import android.os.*;
|
||||||
import com.google.gson.*;
|
import com.google.gson.*;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import net.kdt.pojavlaunch.*;
|
import net.kdt.pojavlaunch.*;
|
||||||
import net.kdt.pojavlaunch.authenticator.mojang.yggdrasil.*;
|
import net.kdt.pojavlaunch.authenticator.mojang.yggdrasil.*;
|
||||||
@ -37,7 +39,10 @@ public class RefreshTokenTask extends AsyncTask<String, Void, Throwable> {
|
|||||||
try {
|
try {
|
||||||
this.profilePath = MinecraftAccount.load(args[0]);
|
this.profilePath = MinecraftAccount.load(args[0]);
|
||||||
int responseCode = 400;
|
int responseCode = 400;
|
||||||
responseCode = this.authenticator.validate(profilePath.accessToken).statusCode;
|
try {
|
||||||
|
responseCode = this.authenticator.validate(profilePath.accessToken).statusCode;
|
||||||
|
}catch(RuntimeException e) {}
|
||||||
|
|
||||||
if (responseCode == 403) {
|
if (responseCode == 403) {
|
||||||
RefreshResponse response = this.authenticator.refresh(profilePath.accessToken, UUID.fromString(profilePath.clientToken));
|
RefreshResponse response = this.authenticator.refresh(profilePath.accessToken, UUID.fromString(profilePath.clientToken));
|
||||||
// if (response == null) {
|
// if (response == null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user