I have a web application built with Laravel 5.1.
I have opened a POST route on frontend for webview apps.
This is my app login function:
$json = array();
$credentials = [
'email' => $request->email,
'password' => $request->password,
];
$error = $this->auth->login($credentials, false);
if (!$error)
$json['success'] = trans('user::messages.successfully logged in');
else
$json['error'] = $error;
echo json_encode($json);
However, when I redirect the mobile user to homepage after a successfull request, user is not logged in.
Interestingly, when I close and re-open the app, user is logged in.
Any ideas?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire