Skip to content

SidneyAllen/strava-typescript-koa

Repository files navigation

Strava Typescript Koa

This example app demonstrates Strava's 3-legged OAuth2 flow and displays basic profile information.

Project built with:

  • TypeScript
  • Koa
  • Simple OAuth2

Live Demo

This project has been deployed on Render.

See Live Demo

Getting Started

Fork or Clone this repository to your local development environement

Install Dependencies

cd strava-typescript-koa
npm install

Get your App Client ID & Secret

Go to Strava.com to create your account. You will need to be a paying member to builid using Strava's API.

Go to your My Application API in your profile settings.

You'll find your client id and secret, which you'll use in the next section.

Before you leave, set the authorization callback domain to localhost:3000

Configure your app

Rename the file env.example to .env

Copy and paste your client id and client secret into the .env file.

CLIENT_ID="YOUR_STRAVA_CLIENT_ID"
CLIENT_SECRET="YOUR_STRAVA_CLIENT_SECRET"
REDIRECT_URI="http://localhost:3000/callback"

Build Project

npm run build

Run Project Locally

npm run start

Check in your browser

Open your browser to

http://localhost:3000

If everything went according to plan, you should see a Connect to Strava link. Click it, an authorize access to your Strava account. Upon successfully connecting, click Get My Profile to see some basic profile information.

About

Strava demo app built with TypeScript and Koa

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published