markitosgv/JWTRefreshTokenBundle

How to use refresh token manually in symfony controller ?

ydem83 opened this issue · 1 comments

Hello,
I use the lexik jwt bundle in a symfony 5 project, the token generation + refresh token works perfectly with these two bundles. To create a new connection entry point I want to generate a token + a refresh from a symfony controller, but I cannot find the solution allowing this, thank you in advance for your answers

This is my solution :
$refreshToken = $Refreshinterface->createForUserWithTtl($user, 3600); $em->persist($refreshToken); $em->flush();