cancel
Showing results for 
Search instead for 
Did you mean: 

How to create Access Token in Magento 2.4.5

How to create Access Token in Magento 2.4.5

I am creating the acess token using API /rest/default/V1/integration/customer/token.

The Api is returning Access token successfully ( such an oversized token) but it didnot saved in database in oauth_token table.

Token : 

"eyJraWQiOiIxIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOjEsInV0eXBpZCI6MywiaWF0IjoxNjYzMTM4NTU0LCJleHAiOjE2NjMxNDIxNTR9.ze65jzHrdqqCyONuodFcCSA6rZPhi-3rgzMQcVT7QW0"
 

I am performing the same thing in Magento 2.4.2 it is working fine

Any information / help regarding this. Thanks in advance

3 REPLIES 3

Re: How to create Access Token in Magento 2.4.5

Did you manage to determine where the tokens are stored?

Re: How to create Access Token in Magento 2.4.5

Determine that the tokes are no longer stored.

 

An array is created with the user id expiration and creation date.

The expiration is calculated using the time from the webapi/jwtauth/customer_expiration setting in minutes.

 

This is the file I'm exporting vendor/magento/module-jwt-framework-adapter/Model/JwsManager.php

 

I still have several doubts

 

But I'll keep investigating.

Re: How to create Access Token in Magento 2.4.5

To get a token, you need to specify the user's name and password in the payload. By default, an admin token is valid for 4 hours. To change this value, please access to your admin panel and navigate to Stores > Settings > Configuration > Services > OAuth > Access Token Expiration > Admin Token Lifetime (hours). As I know this way you can access Token in Magento.  myhealthonline sign in