mercredi 30 janvier 2019

Getting HTTP 419 requesting on iphone app

I developed a login endpoint for the api that I am working on and have been testing this endpoint with postman. Once I finished I tested it with postman and received a 200 success message. After integrating this into my app using Alamofire I did not get the same message back. Instead I got a 419. Upon further inspection on other topics I found that this is due to no csrf token in my request, but I do not have one in my postman request. Not sure what is going on but any help would be great.

public function login(LoginRequest $request){
        $credentials = $request->only('email', 'password');
        if (Auth::attempt($credentials)) {
            return Auth::user();
        }
    }

POST /api/v1/login?email=test@test.com& password=123456 HTTP/1.1
Host: mysite.com
Accept: application/json
cache-control: no-cache



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2Rrxx4V
via IFTTT

Aucun commentaire:

Enregistrer un commentaire