# Validating SPA JWT Tokens in the backend

**URL:** <https://community.auth0.com/t/validating-spa-jwt-tokens-in-the-backend/94414>\
**Category:** Get Help\
**Tags:** clients, management-api\
**Created:** [November 14, 2022, 9:58pm UTC](https://community.auth0.com/t/validating-spa-jwt-tokens-in-the-backend/94414 "2022-11-14T21:58:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanmihartescu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stefanmihartescu/32/35169_2.png) [@stefanmihartescu](https://community.auth0.com/u/stefanmihartescu)\
**Post date:** [November 14, 2022, 9:58pm UTC](https://community.auth0.com/t/validating-spa-jwt-tokens-in-the-backend/94414/1 "2022-11-14T21:58:58Z")

</div>

Hello,

I’m connecting with github and I want to obtain IDP tokens from management api.

Using this guide [Auth0 Python API SDK Quickstarts: Add Authorization to a Flask API application](https://auth0.com/docs/quickstart/backend/python/interactive) the process goes as follow:

1. User logins

 ![Screenshot 2022-11-14 at 23.45.17](https://global.discourse-cdn.com/auth0/original/3X/d/d/dda2004dce22b2a15564ab17bae3e2091cf015ef.png)

1. Use access\_token to fetch / on backend
2. Validate token on backend using public key and referencing custom api

Validation works for M2M tokens but not for SPA tokens.

How do I validate SPA tokens ?

---

<div class="post-metadata">

**Author:** ![stefanmihartescu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stefanmihartescu/32/35169_2.png) [@stefanmihartescu](https://community.auth0.com/u/stefanmihartescu)\
**Post date:** [November 14, 2022, 10:25pm UTC](https://community.auth0.com/t/validating-spa-jwt-tokens-in-the-backend/94414/2 "2022-11-14T22:25:47Z")

</div>

PS:

Omitted to mention the audience when requesting the token.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 28, 2022, 10:25pm UTC](https://community.auth0.com/t/validating-spa-jwt-tokens-in-the-backend/94414/3 "2022-11-28T22:25:59Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
