I have an ASP .NET Core MVC website that is for fitness etc. I'm trying to make it so people can connect their accounts on my site with their Strava accounts. I've read and re-read the Strava API documentation and I can't work it out.
I know that when you request access to Strava you wind up on a page like this: https://www.strava.com/oauth/authorize?client_id=25011&response_type=code&redirect_uri=http://localhost:61488&approval_prompt=force. Once the user clicks Authorize then it redirects to the URL supplied in redirect_uri. The "code" query string parameter that gets put into the address bar isn't a valid authorisation code and I can't actually use it for anything it would seem.
The ideal flow for my app would be:
- Someone signs up for an account on my site
- They click a link to auth Strava with their new account (so my web app has access to their strava data)
- My web app goes and gets all their historical activities and pulls it across
- My app displays this data
I'm falling down on the authentication step, and also the subsequent retrieval of data. Any help would be greatly appreciated :)