'How to intergarte react native front end with django backend
Post Method Used In ReactNative
Error raised
Forbidden: /api/login/
I created a user API using djangorest framework and it is functioning well, however i dont know how to add it to my react native front end for authentication. I would like users to login and the drf to authenticate them. Is there a tutorial i can follow, i tried to look at a few but they didnt work for me. I'm new to react native. Would appreciate elaborate answers and shared resources
Currently using expo cli and unable to fetch data from drf(django rest framework).
is there a way i can request my post method to use djangosessions for authentication instead of auth tokens
the method in the image only works if'rest_framework.authentication.SessionAuthentication',
is disabled and this is used to get data in api so it cannot be excluded
Solution 1:[1]
welcome to ReactNative You can use different libraries to handle an api request. Take a look at axios: https://github.com/axios/axios
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | AE0011 |
