hello, I'm trying to get JWT token from headers using JWTAuth::getToken() and this is what i get "authorization": {}, and while dd(JWTAuth::getToken()), it gives response as
Token {#360
-value: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjQsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9hcGkvdjEvbG9naW4iLCJpYXQiOjE1MDAzNjMzNzgsImV4cCI6MTUwMDY2MzM3OCwibmJmIjoxNTAwMzYzMzc4LCJqdGkiOiI0bmkyVmg5RWt1TWtWNnhkIn0.OORKHBnIareDr2Z48pkXN-V3ykUEQRfpfNx5RnQkVI4"
}
Is there any way to access the above token or get token value
Yes, my guess is there is a different bug in your code. Can you add more code where this is happening?
I'm sorry didn't reply then. I already fixed it by doing (string)JWTAuth::getToken() which successfully gives me my required Authorization Code
Instead, you can use JWTAuth::getToken()->get()
@tijanmdr Man you are a savior .. you have no idea
@eranshmil thanks man it worked
Thanks man it works
Most helpful comment
Instead, you can use JWTAuth::getToken()->get()