-
Please tell me how to link the authentication information of the allauth headless API in Django REST framework for both app and browser cases. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Without knowing any specifics this is difficult to answer, as authentication is pluggable over at DRF. In any case, allauth headless uses session authentication on the browser, and an X-Session-Token header for apps. So, if you configure DRF to use sessions as well, the browser case is covered. As for apps, you can either setup DRF to recognize the X-Session-Token header and use that throughout your app. Or, if you want, you can configure allauth to generate an access token. You would have to hook something like this up:
.. over here: But as mentioned, it all depends on your requirements... there are other options over at DRF as well. |
Beta Was this translation helpful? Give feedback.
Without knowing any specifics this is difficult to answer, as authentication is pluggable over at DRF. In any case, allauth headless uses session authentication on the browser, and an X-Session-Token header for apps. So, if you configure DRF to use sessions as well, the browser case is covered. As for apps, you can either setup DRF to recognize the X-Session-Token header and use that throughout your app. Or, if you want, you can configure allauth to generate an access token. You would have to hook something like this up:
.. over here:
h…