After completeing a login with a single page application, can I check the JWT with PHP?

Hi,

I completed the guide for a single page application.

After a successful login, I want to take the token and process an AJAX request to a PHP server that will verify the token and decode it, and return the database of the user.

I know how to do this with Node / Express (As in the sample) but I have all my SQL classes written in PHP, so I wanted to check the possibility to verify the token with PHP.

It it possible? Can you share an example?

Thanks!

Hi @somekh.dave,

Take a look at our PHP API quickstart documentation on jwt validation:

Does that help?
Dan

Excellent, working perfect!

Glad that worked for you! Good luck!

I’m not able to use your quickstart example.

Your code for Main.php uses class JWTVerifier.

```
// src/Main.php

<?php

namespace App;

use Auth0\SDK\JWTVerifier;

class Main {
```

According to the release notes for Auth0 PHP:

## Classes and Interfaces removed

The following classes were removed in v7:

- Class `JWTVerifier` was removed, see the `Auth0->decodeIdToken()` method for how to use the replacement classes

Same problem with your tutorial Developing RESTful APIs with Lumen (A PHP Micro-framework) at

It looks like this is mentioned here, and this doc should be up to date.

I’ll look into the other docs, thank you for bringing it to our attention!