How To Solve UnAuthenticate user Error in Api

admin_img Posted By Bajarangi soft , Posted On 03-10-2022

in this blog we solve un authenticate user error in api, in this blog the error showing in android or ios app ,api not working properly, in app displayed Error user is unauthorized ,so now follow this code to solve error.

How To Solve UnAuthenticate user Error in Api

  1. first clear cookies from your Browser.
  2. now open your laravel project.
  3. open the config file directory.
  4. and open cors.php file.
cors.png
  
     Chenge the  'supports_credentials' => true,     
       
    5.now opne the sanctum.php file and check the gaurd  name is same as in config.php file.


     
     6.next spet to open session.php file and check  'expire_on_close' and  'encrypt'


if 'expire_on_close' => true, change in  'expire_on_close' => false,
and
if 'encrypt' => false,  change in  'encrypt' => true,


     7.finel step is opne the cPanel and change  Your project PHP version like showing in image.



 

Related Post