If you don't activate your device within 10 minutes the authentication/authorization of the device (the MagicMirror) will expire. When it expires the module creates a token file which will be empty. This empty token file will be used in all other attempts which leads to Error: OAuth required.
This bug is probably what causes the problems in issue #17 .
Suggested solution
Handle the expire error properly without creating an empty token file.
Restart the device authorization.
Limit the number of authorization restarts so the module don’t spam trakt.tv.
Show a message in the frontend that MM has to be restarted if the limit is reached.
Oh yeah, instead of just logging the error and continuing we should probably return Promise.reject(error); and restart the get_codes promise. Never actually tried to idle for so long, so I never saw this error.
Description
If you don't activate your device within 10 minutes the authentication/authorization of the device (the MagicMirror) will expire. When it expires the module creates a token file which will be empty. This empty token file will be used in all other attempts which leads to
Error: OAuth required
.This bug is probably what causes the problems in issue #17 .
Suggested solution
Logs