Replies: 4 comments 20 replies
-
Also here is the callback cookie info
|
Beta Was this translation helpful? Give feedback.
-
What would your suggest for being able to use your headless allauth to then provide jwt tokens in the callback to my front end application? I'm not using sessions to check if a user is logged in but an access token paired with a refresh cookie. |
Beta Was this translation helpful? Give feedback.
-
@pennersr What is the main use case for overriding TokenStrategy? Is it just to customize how to issue session tokens and their cookie names etc.? |
Beta Was this translation helpful? Give feedback.
-
@pennersr Is there an example that demonstrate the app context based login flow? The react-spa is based on browser context, and I don't know how to trigger the login process under the app context |
Beta Was this translation helpful? Give feedback.
-
I'm setting a custom token strategy, but it doesn't seem to be pulling in the class I'm setting for it. here is the settings file line to set the custom class
HEADLESS_TOKEN_STRATEGY = "app_web.views.auth.validators.SessionTokenStrategy"
and here is the class. I'm expecting to run. I'm just setting it to "hello" to see if it changes the sessionID but it does not seem todo anything.
should I be aware of failure states that don't bubble up? it seems like it's not overriding the class for some reason.
`
class SessionTokenStrategy(AbstractTokenStrategy):
def get_session_token(self, request: HttpRequest) -> typing.Optional[str]:
token = request.headers.get("x-session-token")
return token
`
Beta Was this translation helpful? Give feedback.
All reactions