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

#194 Fix token storage issue for no email on athlete #193

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vandeseer
Copy link

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:

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.

@vandeseer vandeseer changed the title Fix token storage issue for no email on athlete #194 Fix token storage issue for no email on athlete Feb 3, 2019
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

Successfully merging this pull request may close these issues.

6 participants