Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication error when using the sandbox api #3

Closed
anusharanganathan opened this issue Dec 2, 2015 · 3 comments
Closed

Authentication error when using the sandbox api #3

anusharanganathan opened this issue Dec 2, 2015 · 3 comments

Comments

@anusharanganathan
Copy link
Contributor

When the OAuth callback is received from Orcid sandbox, I get the following error

ERROR -- omniauth: (orcid) Authentication failure! invalid_credentials:
OAuth2::Error, :
{"message-version":"1.2","orcid-profile":null,"orcid-search-results":null,
"error-desc":{"value":"Not found : No entity found for query"}}

I do have a user profile in both production and sandbox Orcid instances, but I guess my user id would be different in both.

Antonin Delpeuch very kindly pointed out that the profile details were being fetched from production and not sandbox. See message https://groups.google.com/d/msg/orcid-api-users/tWjaJpjtvRQ/VCQjogUzDAAJ for details

@mfenner
Copy link
Contributor

mfenner commented Dec 2, 2015

Yes, this is a bug. I tried to abstract away the different options to call the ORCID API (member, sandbox), but didn't fully think this true for the second API call that fetches additional information - a feature added recently. For now the workaround is to use skip_info? => true in the omniauth configuration options.

@anusharanganathan
Copy link
Contributor Author

Thanks. Good to know about the option. I got it working by just fixing the url in the api call. The PR has the code changes I needed to make. I haven't updated the rspec, but happy to do so with a little guidance. I had a look and wasn't sure if it needed updating.

@mfenner
Copy link
Contributor

mfenner commented Dec 2, 2015

Merged the pull request, released as 1.0.31. There are a few other minor changes I want to make before releasing 1.1, which should then have documentation of the changes since 1.0.

@mfenner mfenner closed this as completed Dec 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants