GWM : login token issue

This commit is contained in:
Gowtham M 2025-10-08 14:34:01 +05:30
parent 6f37f65968
commit 1fa8c4cfd2
2 changed files with 6 additions and 5 deletions

View File

@ -24,6 +24,7 @@ $routes->group('api', ['filter' => 'appSignature'], function ($routes) {
$routes->post('auth/login', 'AuthController::login');
$routes->get('auth/oauthClient', 'AuthController::oauthClient');
$routes->post('auth/oauthlogin', 'AuthController::oauthlogin');
$routes->get('auth/logout', 'AuthController::logout');
// MS OAuth api's
@ -43,7 +44,7 @@ $routes->group('api', ['filter' => 'appSignature'], function ($routes) {
$routes->group('api', ['filter' => ["jwtAuth:Org Admin,Travel Admin,Travel Agent,User","appSignature"] ], function ($routes) {
$routes->get('auth/logout', 'AuthController::logout');
$routes->get('downloadPassport', 'UserController::downloadPassport');

View File

@ -424,17 +424,17 @@ class AuthController extends ResourceController
if (!$user) {
return $this->respond([
'status' => 400,
'status' => 404,
'message' => 'User not found or inactive'
], 400);
], 404);
}
// Check token match
if ($user['current_token'] !== $token) {
return $this->respond([
'status' => 401,
'status' => 200,
'message' => 'Unknown login or invalid token'
], 401);
], 200);
}
// Token matches — logout success