prime-8-consulting / meteor-oauth2

60 stars 20 forks source link

PR #9 broke something; OAuth2Error - Invalid client credentials #11

Closed awatson1978 closed 8 years ago

awatson1978 commented 8 years ago

Okay, just walked through the entire flow, and got an error on Step 4. Backed out of my feature branch, got it again. Pulled directly from prime-8-consulting/meteor-oath2 and it's there as well.

Authorize button clicked.
index.js:44 urlParams Object {client_id: "resourceServerClient", redirect_uri: "http://localhost:3200/_oauth/MeteorOAuth2Server", response_type: "code"}
index.js:54 undefined Object {success: false, error: Object, authorizationCode: null, redirectToUri: null}authorizationCode: nullerror: Objectcode: 400error: "invalid_client"error_description: "Invalid client credentials"headers: Objectmessage: "Invalid client credentials"name: "OAuth2Error"__proto__: ObjectredirectToUri: nullsuccess: false__proto__: Object

Seems to have been introduced after PR #9. Holding off on PR #10 until we can get this resolved.

awatson1978 commented 8 years ago

Good news - it's an easy fix on examples/resourceServer/client/index.html#L27

resourceServerClient should be clientApplication, like so:

<a href="/?client_id=clientApplication&redirect_uri=http://localhost:3200/_oauth/MeteorOAuth2Server&response_type=code">Simulate proper link.</a>

Will add to PR #10

vangorra commented 8 years ago

Fixed in PR #10