How to generate JWT type access token from Facebook

Viewed 122

I tried to generate JWT access token from Facebook and followed the steps given below:

Called the following endpoint to get auth code.

https://www.facebook.com/v11.0/dialog/oauth?client_id={appId}&redirect_uri={my-redirect-uri}&state="{state}"

It returned a code and requested token using the following curl command:

curl --location --request POST 'https://graph.facebook.com/v11.0/oauth/access_token?
client_id={appId}&
redirect_uri={my-redirect-uri}&
client_secret={clientSecret}&
code={code}'

Got a response in the following format:

{
    "access_token": "{access-token}",
    "token_type": "bearer",
    "expires_in": 5182941
}

The access token format is opaque (normal access token), not a JWT. How can I request a JWT type token from Facebook?

Is it possible to generate JWT type user access token from Facebook?

0 Answers
Related