-
Notifications
You must be signed in to change notification settings - Fork 82
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
From Facebook: The redirect_uri URL must be absolute #18
Comments
Can you paste the relevant part of the log (deleting sensitive data) from "Enter Hybrid_Auth::initialize()" until the end? |
Thanks! my development server IP is xxxxxx and my application is in directory yyyyyy. The config base_url is "/yyyyyy/hauth/endpoint". INFO -- 50.58.207.6 -- 2013-04-12T12:36:45-05:00 -- Enter Hybrid_Auth::initialize() DEBUG -- 50.58.207.6 -- 2013-04-12T12:36:45-05:00 -- Hybrid_Auth::setup( Facebook ). HybridAuth Callback URL set to: -- http://xxxxxx/yyyyyy/hauth/login/Facebook |
The value in your "base_url" must be "/hauth/endpoint" (without the application directory part). |
I don't think that's it. The hauth controller is with my other controllers in the yyyyyy "project" directory, i.e., /yyyyyy/application/controllers/hauth. So when I take out the yyyyyy directory from the base_url, I get the "Object not found!" error when it looks for the hauth controller. When I leave it in, the hauth controller at least sends the login information to Facebook, but without the 'http://xxxxxx" in the redirect_uri parameter: INFO -- 50.58.207.6 -- 2013-04-12T12:36:45-05:00 -- Enter Hybrid_Auth::redirect( https://www.facebook.com/dialog/oauth?client_id=AAAAAAAAAAAAAAA&redirect_uri=%2Fyyyyyyy%2Fhauth%2Fendpoint%3Fhauth.done%3DFacebook&state=d7bc0048f7dd9e79bf987654aa9bdb7a&scope=email%2C+user_about_me%2C+user_birthday%2C+user_hometown%2C+user_website%2C+read_stream%2C+offline_access%2C+publish_stream%2C+read_friendlists&display=page, PHP ) |
Which is the value configured in the "base_url" param inside config/config.php ? |
In config/config.php, $config['base_url'] = 'http://xxxxxx/yyyyyy/'; Looking deeper, in Provider_Model.php, line 59 there is:
It seems to work if I add the following just below it: This works because hybridauth is sending $this->endpoint as the redirect_uri, but that's probably not the right way to go about it! Maybe 'hauth_session' is not being set correctly? By the way, there is a chance I downloaded the most recent version of hybridauth to work with the most recent version of hybridigniter and they don't work well together. Could that be it? |
Can you try with another browser? |
Same thing: "The redirect_uri URL must be absolute" because 'http://xxxxxx/' is left off. |
Maybe there is a problem with the subfolder installation. Let me test it. I have no time now, sorry. |
No problem. Thanks for looking at it. This is a site that I've been working on for quite a while, so I think the overall structure of codeigniter is set up right. |
I replaced all the files from the latest version of HybridAuth (2.1.2) with the HybridAuth files from your fork (version?), and that fixed my problem. I should have done that first. Sorry to bother you. |
Can you tell me the differences between the two versions of HybridAuth? Both should be equal. |
I have no idea. All I know is when I put back the HybridAuth files that were included with the HybridIgniter files, it worked fine. When I replaced those with the files in the latest version of HybridAuth, I ran into the problem with the incomplete "redirect_uri" parameter of the https://www.facebook.com/dialog/oauth redirect. Try it! |
I'll try it, thanks for the info. |
I can't see any problem. Also, I can't test it because I can't create a Yahoo application with OpenID authentication (new applications authenticates through OAuth). The problem occurs with other providers too? |
please help i have error The redirect_uri URL is not supported , i will login with oauth fb in laravel 5.4 |
I get the following error when I try to login via FaceBook: "The redirect_uri URL must be absolute". That is coming directly from Facebook.
When I look in hybridauth.log, the [hauth_return_to] property contains the complete url (starting with "http://"), but the [login_done] property does not.
Also, the last entry is "Enter Hybrid_Auth::redirect( https://www.facebook.com/dialog/oauth?........" but the redirect_uri parameter does not contain the complete url which I'm sure is causing the error back from Facebook.
Where do I set the complete URL in my configuration?
Thanks!
The text was updated successfully, but these errors were encountered: