Generate Refresh Token

edxz posted 2 years ago

I'm working on user registration in my API using Laravel Passport, and I need to return refresh_token as the response in my API on successful registration. I can only get access token using createToken() from HasApiTokens trait but it does not generate refresh token.

Is there a way to generate refresh token in Laravel Passport?

What I'm doing in my client right now is by submit the registration request, and then submit another login request to get the refresh token. Is this approach right? thanks before

Cheslyn Fielding replied 1 year ago


Have you perhaps figured this out yet. I'm sitting with the exact same issue. Thanks in advance.

Sign in to participate in this thread!

We'd like to thank these amazing companies for supporting us