Skip to content

Understanding HEADLESS flow #4123

Answered by pennersr
citizenfish asked this question in Q&A
Sep 27, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

You've covered exactly the part that allauth considers in scope: authentication of the user. How to invoke your own APIs is something allauth puts no constraints/assumptions on, as that depends on what framework (e.g. django rest framework / ninja) you use, and also what authentication method you desire there.

  • If your APIs require a specific access token, a JWT, or anything like that: use settings.HEADLESS_TOKEN_STRATEGY to point to a token strategy that creates such a token. Once you set that up, the token will appear in the meta next to the session_token.
  • If you don't have any specific requirements, you could use the session token. You will likely need to add an authentication method t…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@citizenfish
Comment options

@citizenfish
Comment options

Answer selected by citizenfish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants