MrSwitch / hello.js

A Javascript RESTFUL API library for connecting with OAuth2 services, such as Google+ API, Facebook Graph and Windows Live Connect
https://adodson.com/hello.js/
MIT License
4.63k stars 548 forks source link

Issue with auth-server #380

Closed cfjedimaster closed 8 years ago

cfjedimaster commented 8 years ago

I'm trying to add my client id/settings and keep running into an error. On save, I get:

duplicate key value violates unique constraint "app_pkey"

cfjedimaster commented 8 years ago

If I modify my client secret to add a letter to the end, it saves. But obviously that isn't a correct id.

cfjedimaster commented 8 years ago

So - the issue is that I had registered this before when I logged in via Google. This time I had logged in via GitHub app. The app should handle the error much better though.

MrSwitch commented 8 years ago

Hi @cfjedimaster glad you sorted it out. Thanks for your feedback. How about an error message that said "This client_id is already registered with another account" - that would be fairly trivial to accomplish.

Beyond that do you have any suggestions on how a better flow might work. Like what would be your dream scenario?

cfjedimaster commented 8 years ago

Just a better error message would help everything. :)

MrSwitch commented 8 years ago

It now says "The client_id has already been set"..

image

cfjedimaster commented 8 years ago

LGTM. One worry though - isn't it technically possible for 2 services to use the same client id? I mean, I'm sure there is 0.000001% chance of that happening, but it is possible, right?

On Sun, Dec 27, 2015 at 11:48 AM, Andrew Dodson notifications@github.com wrote:

It now says "The client_id has already been set"..

[image: image] https://cloud.githubusercontent.com/assets/947163/12011355/e6ae4b92-acc1-11e5-85e0-a185d15a049e.png

— Reply to this email directly or view it on GitHub https://github.com/MrSwitch/hello.js/issues/380#issuecomment-167430705.

Raymond Camden, Developer Advocate for MobileFirst at IBM

Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden

MrSwitch commented 8 years ago

Yes that is indeed possible. If that does occur then the user has two options, register and alternative client_id or maintain their own version of the oauth-shim.