Fix for Base64 decoding
This commit is contained in:
parent
7a090e8827
commit
e63f3ed13d
@ -767,7 +767,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 35;
|
||||
CURRENT_PROJECT_VERSION = 37;
|
||||
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
||||
INFOPLIST_FILE = AutoCat/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
@ -789,7 +789,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 35;
|
||||
CURRENT_PROJECT_VERSION = 37;
|
||||
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
||||
INFOPLIST_FILE = AutoCat/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
|
||||
@ -3,9 +3,9 @@ import Foundation
|
||||
enum Constants {
|
||||
static var baseUrl: String {
|
||||
#if DEBUG
|
||||
return "http://127.0.0.1:3000/"
|
||||
//return "http://127.0.0.1:3000/"
|
||||
//return "http://192.168.1.67:3000/"
|
||||
//return "https://vps.aliencat.pro:8443/"
|
||||
return "https://vps.aliencat.pro:8443/"
|
||||
#else
|
||||
return "https://vps.aliencat.pro:8443/"
|
||||
#endif
|
||||
|
||||
@ -94,7 +94,7 @@ class JWT<T> where T: JwtPayload {
|
||||
if parts.count == 3 {
|
||||
var payloadStr = String(parts[1])
|
||||
if (payloadStr.count % 4 != 0) {
|
||||
payloadStr += String(repeating: "=", count: (payloadStr.count % 4))
|
||||
payloadStr += String(repeating: "=", count: (4 - payloadStr.count % 4))
|
||||
}
|
||||
if let json = Data(base64Encoded: payloadStr, options: [.ignoreUnknownCharacters]) {
|
||||
do {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user