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

Hi, I have some question about token cached. #50

Open
wangcaohong opened this issue Aug 15, 2022 · 2 comments
Open

Hi, I have some question about token cached. #50

wangcaohong opened this issue Aug 15, 2022 · 2 comments

Comments

@wangcaohong
Copy link

Hi, I have a question about token cached. as we know, The access/refresh_token has an expiration date, do u use redis or other in token cached? such as if token has expired, program will listen to the expired information of Redis and then update the token with refresh_token.

@JimCurryWang
Copy link
Owner

Hi @The-Wong ,

In the initial design concept, we hope to keep python-shopee as light as possible, so we didn't include the Redis solution in the cache mechanism. However, I think we can just reinitialize the client instance to get the token update again.

# Reinitialize
client = pyshopee.Client( shopid, partnerid, API_key )

I hope this is helpful.

@wangcaohong
Copy link
Author

Thank you for your reply, but if refresh_token has expired and not reacquired within 30 days , user just need to re-authorized shop, this is very bad in the user experience.

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

2 participants