AS see my captures, i made jwt login page. it makes jwt token but after that, go home and check user's name but Auth::user() is null
if i dd($user) on api/auth/login page, user's info appears but go home page and trying to check user's info, there is only null page
here is my full code. https://github.com/sksmsWKd/MetaComposerProto
would you do me a favor?
this is my login function on AuthController. it makes jwt token well but can't maintain user's login to other page...
$input = $request->only('email', 'password');
$jwt_token = null;
if (!$jwt_token = JWTAuth::attempt($input)) {
return response()->json([
'success' => false,
'message' => 'Invalid Email or Password',
], Response::HTTP_UNAUTHORIZED);
}
return response()->json([
'success' => true,
'token' => $jwt_token,
]);