Title: Rest api authentification via Facebook
Last modified: December 27, 2024

---

# Rest api authentification via Facebook

 *  Resolved [mishaml](https://wordpress.org/support/users/mishaml/)
 * (@mishaml)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/rest-api-authentification-via-rest-api/)
 * Hi! I’m using your rest api guide to implement login for users via Google, Facebook
   and Apple. However, Facebook returns not access_token but a jwt, so the code 
   example always throws an error on it. How can I do rest api authentification 
   via facebook, do you have a method to convert jwt to access token, or i can use
   jwt somehow to login and register users via api.
    -  This topic was modified 1 year, 5 months ago by [mishaml](https://wordpress.org/support/users/mishaml/).

Viewing 1 replies (of 1 total)

 *  Plugin Support [Laszlo](https://wordpress.org/support/users/laszloszalvak/)
 * (@laszloszalvak)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/rest-api-authentification-via-rest-api/#post-18217562)
 * Hi [@mishaml](https://wordpress.org/support/users/mishaml/)
 * I think there is probably a misunderstanding here. So first of all I need to 
   clarify that, our REST API won’t handle the login or the registration, as our
   documentation mentions:
    - [https://nextendweb.com/nextend-social-login-docs/nextend-social-login-rest-api/#rest_api](https://nextendweb.com/nextend-social-login-docs/nextend-social-login-rest-api/#rest_api)
 * all it does is that, it checks if the social media user associated with the access
   token is registered on your site or not, and if it is, then it will return the
   User ID of the WordPress account that is associated with the social media account.
   The actual registration / login logics still need to be implemented via custom
   coding. ( In the developer documentation you can find a skeleton code, that serves
   an example. )
 * **As for JWT token:**
 * We don’t support JWT tokens. Nextend Social Login uses the OAuth2 authorization
   protocol:
    - [https://oauth.net/2/](https://oauth.net/2/)
 * Where basically you have a Web App at the provider. Your visitors can authorize
   that app when they connect with the selected provider, so the Web App can make
   requests on behalf of the user, using an access token to get their data over 
   the REST API of the provider.
 * In order to be able to make REST API requests, our own REST API endpoint also
   expects you to submit an access token:
    - [https://developers.facebook.com/docs/facebook-login/guides/advanced/manual-flow/#exchangecode](https://developers.facebook.com/docs/facebook-login/guides/advanced/manual-flow/#exchangecode)
 * Without that you won’t be able to use it, I am sorry.
 * In our developer documentation you can find examples of access token formats 
   that each provider returns normally:
    - [https://nextendweb.com/nextend-social-login-docs/nextend-social-login-rest-api/#access_token_format](https://nextendweb.com/nextend-social-login-docs/nextend-social-login-rest-api/#access_token_format)
 * **Tip:**
 * There is a third party developer, who created a plugin that utilizes “Nextend
   Social Login” and the “JWT Authentication for WP REST API” plugin to handle login
   over the REST API. We are not affiliated the plugin’s developer, but in this 
   topic you can find the link of the plugin:
    - [https://wordpress.org/support/topic/nextend-social-login-6/](https://wordpress.org/support/topic/nextend-social-login-6/)
 * Feel free to get in touch with the developer of the plugin, and they could give
   you more information regarding the JWT tokens.
 * Best regards,
   Laszlo.

Viewing 1 replies (of 1 total)

The topic ‘Rest api authentification via Facebook’ is closed to new replies.

 * ![](https://ps.w.org/nextend-facebook-connect/assets/icon.svg?rev=3336394)
 * [Nextend Social Login and Register](https://wordpress.org/plugins/nextend-facebook-connect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextend-facebook-connect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextend-facebook-connect/)
 * [Active Topics](https://wordpress.org/support/plugin/nextend-facebook-connect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextend-facebook-connect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextend-facebook-connect/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Laszlo](https://wordpress.org/support/users/laszloszalvak/)
 * Last activity: [1 year, 5 months ago](https://wordpress.org/support/topic/rest-api-authentification-via-rest-api/#post-18217562)
 * Status: resolved