Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use the returned refresh token next time authentcate? #150

Open
ArnabChatterjee20k opened this issue Mar 10, 2023 · 5 comments
Open

Comments

@ArnabChatterjee20k
Copy link

I am generating refresh_token but no method or attribute is present in Api class to use it to authenticate next time using the refresh_token. How to use refresh_token for authentication?

@MerleLiuKun
Copy link
Member

If you have refresh_token, you can use method refresh_access_token to get new access token.

@ArnabChatterjee20k
Copy link
Author

But how to use it to authenticate. Means in Api class we can provide only access_token attribute no attribute for providing the refresh_token

@MerleLiuKun
Copy link
Member

MerleLiuKun commented Mar 10, 2023

I don't know your mean?

The refresh_token is to exchange the access token, If your current access token has invalid.

You can use the refresh_token to get new access token. Then you can use the new access token to get data

@maxoja
Copy link

maxoja commented Sep 25, 2023

The confusing point is that when I call refresh_access_token() it only returns with new access_token without new refresh_token, but I guess it's because we can keep reusing the old refresh_token received from he initial token generation repeatedly

@MerleLiuKun
Copy link
Member

Yes, You are right, The refresh_token can be alaways use before it been invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants