Skip to content

Trying to use it with mongo, but the user login_check payload is empty #1049

Answered by chalasr
ProteanCode asked this question in Q&A
Discussion options

You must be logged in to vote

Oh ok it's not when using a token but when trying to get one. The main target of this feature is to allow not querying the database on token-authenticated requests, so you only need to hit the database once when obtaining a token. And to obtain a token, you need a regular user class and user provider such as https://symfony.com/doc/current/security/user_providers.html#entity-user-provider. The database-less user provider is mostly useful for server-to-server interactions.
If you want to use this bundle the classic way i.e. authenticating a user that exists in your database, then you may not need to use the database-less JWTUserProvider and JWTUser class at all but just follow the getting …

Replies: 5 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@chalasr
Comment options

@chalasr
Comment options

@ProteanCode
Comment options

@chalasr
Comment options

@ProteanCode
Comment options

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

This discussion was converted from issue #1047 on July 20, 2022 21:29.