React native token for api

Hi there.

I am developing an application with a React Native application and a Django Rest Framework backend. Now, when users are authenticated in React Native, and I use the getCredentials() function from the useAuth0() hook, I get an accessToken and an idToken. However, both of these tokens are unable to authenticate in the Django REST framework application. I followed this tutorial to integrate Auth0 with django. Any help is appreciated.

Hello, Marteen! :wave: Welcome to the Auth0 Community!

While I understand that you are using React Native, I’d like to rule out any issues first on the API layer: your Django API.

Could you please try running this full-stack code sample that uses a React SPA + a Django API?

I suggest comparing the implementation from the Django API code sample to your own implementation. The Django API should be able to receive and handle access tokens issued by Auth0 from any client application – mobile or SPA, for example.

1 Like

Thank you for getting back to me. The application provided works. However, the django implementation looks very different from what’s described in the docs. Anyhow, I implemented the django api as done in the example, but I am still unable to authenticate with the tokens from my react native app