Remove anon key from MarksAuth — open device registration
Some checks failed
CI / build-and-deploy (push) Failing after 8s
Some checks failed
CI / build-and-deploy (push) Failing after 8s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
// Hardcoded backend config — no user-facing settings needed
|
private let backendBaseURL = "https://chatai-realtime-proxy-production.up.railway.app"
|
||||||
private let backendBaseURL = "https://magicive-api-production.up.railway.app"
|
|
||||||
private let marksAnonKey = "marks-anon-2025"
|
|
||||||
|
|
||||||
private let tokenKey = "marksJWT"
|
private let tokenKey = "marksJWT"
|
||||||
private let tokenExpiryKey = "marksJWTExpiry"
|
private let tokenExpiryKey = "marksJWTExpiry"
|
||||||
@@ -34,7 +32,6 @@ enum MarksAuth {
|
|||||||
var req = URLRequest(url: url)
|
var req = URLRequest(url: url)
|
||||||
req.httpMethod = "POST"
|
req.httpMethod = "POST"
|
||||||
req.setValue("application/json", forHTTPHeaderField: "Content-Type")
|
req.setValue("application/json", forHTTPHeaderField: "Content-Type")
|
||||||
req.setValue(marksAnonKey, forHTTPHeaderField: "X-API-Key")
|
|
||||||
req.httpBody = try JSONSerialization.data(withJSONObject: ["device_id": deviceId])
|
req.httpBody = try JSONSerialization.data(withJSONObject: ["device_id": deviceId])
|
||||||
let (data, response) = try await URLSession.shared.data(for: req)
|
let (data, response) = try await URLSession.shared.data(for: req)
|
||||||
let status = (response as? HTTPURLResponse)?.statusCode ?? 0
|
let status = (response as? HTTPURLResponse)?.statusCode ?? 0
|
||||||
|
|||||||
Reference in New Issue
Block a user