ClientSecret: "@FITBIT_CLIENT_SECRET@",
Endpoint: oauth2fitbit.Endpoint,
RedirectURL: "https://kraftakt.octo.it/fitbit/grant",
- Scopes: []string{"activity", "heartrate", "profile"},
+ Scopes: []string{
+ "activity",
+ "heartrate",
+ "profile",
+ "sleep",
+ },
}
const csrfToken = "@CSRFTOKEN@"
return fmt.Errorf("c.Subscribe() = %v", err)
}
+ if err := c.Subscribe(ctx, "sleep"); err != nil {
+ return fmt.Errorf("c.Subscribe() = %v", err)
+ }
+
redirectURL := r.URL
redirectURL.Path = "/"
redirectURL.RawQuery = ""