dion: add email/password to fix cookie expiration
This commit is contained in:
1 parent
a7b7fba0a6
commit
6c732f34e3
12 files changed
+388
-63
No files matched your search
@@ -56,6 +56,12 @@ func main() {
|
||||
if err := auth.LoadCookiesFromFile(*cookiesPath); err != nil {
|
||||
log.Fatalf("[FATAL] LoadCookiesFromFile: %v", err)
|
||||
}
|
||||
if !auth.HasCredentials() && !auth.HasRefreshCookie() {
|
||||
log.Fatalf("[FATAL] %s has neither cookies nor credentials, add \"email\" and \"password\" fields to it", *cookiesPath)
|
||||
}
|
||||
if auth.HasCredentials() {
|
||||
log.Printf("[auth] credentials present, session will re-login automatically when the refresh token dies")
|
||||
}
|
||||
if err := auth.EnsureValidToken(); err != nil {
|
||||
log.Fatalf("[FATAL] EnsureValidToken: %v", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user