node-strava/node-strava-v3

oauth.getRequestAccessURL requires 'redirect_uri' but doesn't validate that it is provided

markstos opened this issue · 3 comments

oauth.getRequestAccessURL should validate that redirect_uri is provided. It's a wasted API call to Strava to have them tell us the value is required when we can check if it's required ourselves. Throwing an exception would be sensible, since it's a programming error if the value is not provided.

The documentation for oath.getRequestAccessURL should also document that it requires the client_id and redirect_uri. Most API calls just require the access_token, so this is exceptional.

I confirmed this bug still exists. The extra check is needed here: https://github.com/UnbounDev/node-strava-v3/blob/master/lib/oauth.js#L8

Confirmed today this is still an issue.

Hello @markstos, to fix it I created #120