How can I generate access token and refresh token together on a login of user..?

I am using Laravel framework with tymon JWT library trying to generate access token and refresh token together for a user login, kindly suggest the way to do it.
thanks.

Hello @John.ICM,

Welcome to the Community! I’m not familiar with Laravel specifically, but you can get a refresh token along with your access token by including the offline_access scope when you callthe /authorize endpoint. E.g.,:

https://YOUR_DOMAIN/authorize?
    audience={API_AUDIENCE}&
    scope=offline_access&
    response_type=code&
    client_id=YOUR_CLIENT_ID&
    redirect_uri=https://YOUR_APP/callback&
    state={OPAQUE_VALUE}

Hello mark
Thanks for your reply.
I do not understand what actually you mean by including the offline_access scope.

is the user must have a valid token for applying it…?
i want to generate the access token and refresh token both on the same time i.e when user enters correct credentials.

Also mark kindly clarify that your solution will only work if i am using Auth0 application on my project.
Or it will work with any JWT library which do not use Auth0…?