January 15, 2019
Email address is no longer part of the profile:read_all scope and is removed from the athlete model.
Hence one gets this error:
Exception in thread "main" java.lang.IllegalArgumentException: Cannot store a token if the athlete has no email
at javastrava.auth.TokenManager.storeToken(TokenManager.java:220)
at javastrava.auth.impl.AuthorisationServiceImpl.tokenExchange(AuthorisationServiceImpl.java:41)
My change fixes this by replacing the user email as map key by the athlete/user ID.
According to https://developers.strava.com/docs/oauth-updates/ there was an update such that the email address is no longer in the oauth answer:
Hence one gets this error:
My change fixes this by replacing the user email as map key by the athlete/user ID.