laravel-passport

Mantaining OAuth keys between elastic beanstalk deployment

一笑奈何 提交于 2021-01-22 06:29:06
问题 I have a laravel application run in AWS Elastic Beanstalk environment. I use Laravel Passport to handle the authentication. Every time I run eb deploy the keys will be deleted, since it is not part of the version control files (included in .gitignore). Thus, I have to manually run php artisan passport:keys in the EC2 instance to generate the keys. But this will make all users need to login again because the old token is now invalid, since it's a new key pair. What is the best practice to

Mantaining OAuth keys between elastic beanstalk deployment

落爺英雄遲暮 提交于 2021-01-22 06:28:53
问题 I have a laravel application run in AWS Elastic Beanstalk environment. I use Laravel Passport to handle the authentication. Every time I run eb deploy the keys will be deleted, since it is not part of the version control files (included in .gitignore). Thus, I have to manually run php artisan passport:keys in the EC2 instance to generate the keys. But this will make all users need to login again because the old token is now invalid, since it's a new key pair. What is the best practice to

Customize Laravel Passport response unauthenticated

北城余情 提交于 2020-12-25 18:15:38
问题 Currently I have a login, register, update and delete functionality using my api made in Laravel using passport feature. Everything works fine the insertion of data and fetching the data from the database using this api. Now I wonder, how can I customize the response of the api when the token is expired. The expiration of token is working fine too. It automatically show this message { "message": "Unauthenticated" } This is the code of routes where it is protected by my Oauth token where if

Customize Laravel Passport response unauthenticated

房东的猫 提交于 2020-12-25 18:13:58
问题 Currently I have a login, register, update and delete functionality using my api made in Laravel using passport feature. Everything works fine the insertion of data and fetching the data from the database using this api. Now I wonder, how can I customize the response of the api when the token is expired. The expiration of token is working fine too. It automatically show this message { "message": "Unauthenticated" } This is the code of routes where it is protected by my Oauth token where if

Customize Laravel Passport response unauthenticated

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-25 18:13:50
问题 Currently I have a login, register, update and delete functionality using my api made in Laravel using passport feature. Everything works fine the insertion of data and fetching the data from the database using this api. Now I wonder, how can I customize the response of the api when the token is expired. The expiration of token is working fine too. It automatically show this message { "message": "Unauthenticated" } This is the code of routes where it is protected by my Oauth token where if

Customize Laravel Passport response unauthenticated

这一生的挚爱 提交于 2020-12-25 18:12:56
问题 Currently I have a login, register, update and delete functionality using my api made in Laravel using passport feature. Everything works fine the insertion of data and fetching the data from the database using this api. Now I wonder, how can I customize the response of the api when the token is expired. The expiration of token is working fine too. It automatically show this message { "message": "Unauthenticated" } This is the code of routes where it is protected by my Oauth token where if

Customize Laravel Passport response unauthenticated

此生再无相见时 提交于 2020-12-25 18:12:00
问题 Currently I have a login, register, update and delete functionality using my api made in Laravel using passport feature. Everything works fine the insertion of data and fetching the data from the database using this api. Now I wonder, how can I customize the response of the api when the token is expired. The expiration of token is working fine too. It automatically show this message { "message": "Unauthenticated" } This is the code of routes where it is protected by my Oauth token where if

Getting exception while create Token using passport Laravel

耗尽温柔 提交于 2020-12-12 11:48:13
问题 Everything is working fine till yesterday. But Today while login through api I am getting an exception while creating token. Exception is : Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated. I don't know where things go wrong. If you have any solution it will really appreciate it, Thanks. code for creating token : $user->createToken('fullaccess')->accessToken; 回答1: I too faced the same issue, a quick solution will

Replicating claims as headers is deprecated and will removed from v4.0 - Laravel Passport Problem in lcobucci/jwt package

限于喜欢 提交于 2020-12-08 06:33:41
问题 I'm using laravel/passport:7.5.1 package in my laravel project and recently faced with this exception. Any Idea? I temperory downgrade the lcobucci/jwt:3.4.0 package to lcobucci/jwt:3.3.3 Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated. Stack Trace: "exception": { "trace": [ "/var/www/app/vendor/lcobucci/jwt/src/Builder.php:334", "/var/www/app/vendor/lcobucci/jwt/src/Builder.php:185", "/var/www/app/vendor

Replicating claims as headers is deprecated and will removed from v4.0 - Laravel Passport Problem in lcobucci/jwt package

吃可爱长大的小学妹 提交于 2020-12-08 06:28:13
问题 I'm using laravel/passport:7.5.1 package in my laravel project and recently faced with this exception. Any Idea? I temperory downgrade the lcobucci/jwt:3.4.0 package to lcobucci/jwt:3.3.3 Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated. Stack Trace: "exception": { "trace": [ "/var/www/app/vendor/lcobucci/jwt/src/Builder.php:334", "/var/www/app/vendor/lcobucci/jwt/src/Builder.php:185", "/var/www/app/vendor