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

Token Expiration after long phase of unchanged IP #24

Closed
Disco1267 opened this issue Mar 17, 2020 · 6 comments
Closed

Token Expiration after long phase of unchanged IP #24

Disco1267 opened this issue Mar 17, 2020 · 6 comments

Comments

@Disco1267
Copy link

Disco1267 commented Mar 17, 2020

Hi !
I am experiencing an issue in this particular situation:
An IP update fails with this message:

Cannot get async token: Failed to read from https://api.domainconnect.1and1.com/v2/oauth/access_token?client_id=domainconnect.org&client_secret=inconceivable&grant_type=refresh_token&redirect_uri=https%3A%2F%2Fdynamicdns.domainconnect.org%2Fddnscode&refresh_token=xxxxxxxxxxx. HTTP code: 400
Could not update DNS record.

I suspect that the refresh token has expired. And the reason would be that the IP didn't change over a long period of time:
Last IP update was 2019-12-02
Next IP update was supposed to happen on: 2020-02-21
That's more than 3 monthes.

So how can I avoid this? Is there a way to enforce an update token.

Thanks for any help

@pawel-kow
Copy link
Member

Hi @Disco1267
we'll take a look into that, to have some minimum update interval to prevent refresh_tokens from expire.
For the time being, as a workaround, you may re-setup your domain and add a second entry to your cron to run the script every 2 weeks with --ignore-previous-ip option, which will enforce the update even if no IP change is detected.

@Disco1267
Copy link
Author

I will do that. Thank you.
Just one more question: For how long is the refresh token valid?

@pawel-kow
Copy link
Member

@Disco1267, it's 30 days at IONOS.

@Disco1267
Copy link
Author

Thanks again!

@pawel-kow
Copy link
Member

Re-opening, as actually code still needs to be fixed

@pawel-kow pawel-kow reopened this Jun 23, 2020
@pawel-kow
Copy link
Member

Fixed with d01c06f
Will be released with v0.0.7

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