I've created a login api and here it is.
Here's how i set my session on android
Now this API
is currently working on android by using Retrofit
and I am currently making it to work also on IOS using Alamofire
and by using the API I made from android but it's very confusing because it always return success even though I input the incorrect credential. Here's the code on xcode . I just made a simple one first
let URL_USER_LOGIN = "https://thelinkoftheapi"
let parameters: Parameters=[
"username": usernameTextField.text!,
"password": passwordTextField.text!,
"operation": "login",
"version" : "1.0.0"
]
Alamofire.request(URL_USER_LOGIN, method: .post, parameters:parameters, encoding: URLEncoding()) .responseString { response in
print(response) // it is always SUCCESS on the console
}
Hope someone can help me out. Thanks