Writing feature test for protected endpoints in Laravel 10 authenticated by Auth0

Situation:

I have a Laravel 10 app that uses was setup as ‘Regular web application’ in Auth0. I want to write feature test for protected routes but Im not sure how I perform authentication. I cant find documentation for this.

Detail of my setup

  • Laravel 10
  • Auth0 7.8

I followed https://auth0.com/docs/quickstart/webapp/laravel/interactive to setup laravel with auth0

  • I have ‘api/posts’ endpoint that only admins can access. Admin is defined in auth0 with permission.

At this point I need direction in this, Im new with auth0 integration.

Thank you so much in Advance.