ging / omniauth-fiware

OmniAuth strategy for authenticating to a FI-WARE Identity Management GE
1 stars 1 forks source link

OAuth2::Error, Authentication header missing #2

Open mbajur opened 9 years ago

mbajur commented 9 years ago

Hi i know there is a more up-to-date fork of omniauth-fiware but there are no issues module enabled on that repo (https://github.com/rin/omniauth-fiware) so i decided to ask that question here.

I'm trying to use omniauth-fiware in my rails app but, in callback phase, i'm getting:

ERROR -- omniauth: (fiware) Authentication failure! invalid_credentials: OAuth2::Error, Authentication header missing. Use HTTP Basic.

Am i missing something or it's a bug of omniauth-fiware?

cc: @rin

rin commented 9 years ago

@mbajur sorry, I have no idea and no time to check :-/ . My fork might be outdated now as well …

rin commented 9 years ago

@mbajur I'm getting the same error now … any news on it?

Your suggestion here – https://github.com/intridea/omniauth-oauth2/issues/76 – looks legit, but doesnt work for me either.

mbajur commented 9 years ago

naah, no news, i'm still stucked. However, isn't that suspicious that reddit uses exact the same code and it works fine? Maybe that's an issue on fiware side?

I'm gonna test all the request sent by oauth2 gem using requestbin today or tomorrow to make sure the header is really there and everything is in place as fiware docs suggests

handylearn commented 9 years ago

It also stopped working for me. It now works for me again with adding the build_access_token and basic_auth_header methods. Other changes I have made: add a trailing slash to authorize_url (one redirect less) and update omniauth_oauth2 to 1.3.1

handylearn commented 9 years ago

I do not use a full gem, instead I have extracted it into a single file. My code is here, and it works for me at least with the Filab Spain 2 Node. https://gist.github.com/handylearn/6d6125263d32544c2057

mbajur commented 9 years ago

Yes! I have checked @handylearn code and it works like a charm. Great! Thanks! :)

adamtomecek commented 8 years ago

Hello. I'm trying to get this work with Gist version of Oauth strategy but still getting "401: The request you have made requires authentication.". User is probably set properly as your Node.js example works just fine. Any ideas what might I be doing wrong?