-
Notifications
You must be signed in to change notification settings - Fork 24
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
Way to set onCredentialsRefreshed #171
Comments
Sorry for the delay, I'll investigate this. If you could file a separate issue for the friend/unfriend error you're seeing, that would be great. Thanks! |
I'm affected by this as well.. as a workaround, i refresh the token on every call to the Reddit obj and store it if it differs. i don't know if this a good workaround but it's working so far. Reddit get reddit {
this.refreshCredentials();
return this._reddit;
}
void refreshCredentials() {
this._reddit.auth.refresh();
newCredentials = this._reddit.auth.credentials.toJson();
if (newCredentials != getStoredCredentials) {
storeCredentials(newCredentials);
}
} |
A summary of whatever is below: A more detailed version: We don't need a for onCredentialsRefreshed. First Method(Not implemented): Second Method: Secondly, if you decide to use Also look at #196. |
Could you please put a way to set the onCredentialsRefreshed in the AuthorizationCodeGrant so a top level notification is sent that the refresh token has been refreshed. I need this because when i use the installed flow, once i authorize i store the credentials so i can use the restore flow. But since i never update the credentials stored, after the expiration of the refresh token, DRAW refreshes it, but i never update my credentials. So then when the application is closed and then opened after a while the restore method fails since i give it the old refresh token.
Also i noticed the friend and unfriend return error "$username is not a know Redditor". I can open a separate issue for this, if thats what your prefer.
Tnx for the awesome API wrapper BTW :)
Oliver
The text was updated successfully, but these errors were encountered: