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

loginOAuthCallback not working #107

Open
yusufyilmaz opened this issue Apr 22, 2016 · 8 comments
Open

loginOAuthCallback not working #107

yusufyilmaz opened this issue Apr 22, 2016 · 8 comments

Comments

@yusufyilmaz
Copy link

Hi There,

I am trying to embed social login. I have setup twitter and google APIs. and I set call back url http://sub.domain.com/home/loginOAuthCallback but it does not log me in. I am sttil seeing login screen. Do I sett callback url wrong?

@topps
Copy link
Member

topps commented Apr 22, 2016

I’m not sure if this listserv will accept a 2MB attachment. I have tried to attach the documentation on how to do this.

If I am interpreting things correctly, you need to change the domain below to your own domain name for where you set up your server. E.g. On our demo server, this is

http://demo.openlabyrinth.ca

…so it would be http://demo.openlabyrinth.ca/home/loginOAuthCallback

One thing that puzzles me that somebody clever from the group might be able to answer… I assumed that this would be calling a file or script on the server that is named loginOAuthCallbackhttp://demo.openlabyrinth.ca/home/loginOAuthCallback – but a search for such a file does not find anything. Is this intrinsic to Apache?

dt

From: Yusuf Yılmaz <[email protected]mailto:[email protected]>
Reply-To: olab/Open-Labyrinth <[email protected]mailto:[email protected]>
Date: Friday, April 22, 2016 at 6:23 AM
To: olab/Open-Labyrinth <[email protected]mailto:[email protected]>
Subject: [olab/Open-Labyrinth] loginOAuthCallback not working (#107)

Hi There,

I am trying to embed social login. I have setup twitter and google APIs. and I set call back url http://sub.domain.com/home/loginOAuthCallback but it does not log me in. I am sttil seeing login screen. Do I sett callback url wrong?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/107

@topps
Copy link
Member

topps commented Apr 22, 2016

I also posted the manual on OAuth setup on our web site at http://openlabyrinth.ca/oauth-manual-v3/

From: Yusuf Yılmaz <[email protected]mailto:[email protected]>
Reply-To: olab/Open-Labyrinth <[email protected]mailto:[email protected]>
Date: Friday, April 22, 2016 at 6:23 AM
To: olab/Open-Labyrinth <[email protected]mailto:[email protected]>
Subject: [olab/Open-Labyrinth] loginOAuthCallback not working (#107)

Hi There,

I am trying to embed social login. I have setup twitter and google APIs. and I set call back url http://sub.domain.com/home/loginOAuthCallback but it does not log me in. I am sttil seeing login screen. Do I sett callback url wrong?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/107

@yusufyilmaz
Copy link
Author

Thank you for your answer @topps

I have already replaced the domain name with my own domain name. The URL is the same. So The call back URL should work but it is not working. So I suspect about my htaccess configuration.

I have changed the .htaccess file as in this issue #104 so do you think that would be the problem of social auth not working?

@topps
Copy link
Member

topps commented Apr 23, 2016

Hmm good question. One problem for me is that I set up our OAuth access parameters a long time ago on our demo site and have not been back since then to look at how this is done. I just know that the set up that I used back then is still working fine across these services. dt

From: Yusuf Yılmaz
Reply-To: olab/Open-Labyrinth
Date: Friday, April 22, 2016 at 10:55 AM
To: olab/Open-Labyrinth
Cc: David Topps, Mention
Subject: Re: [olab/Open-Labyrinth] loginOAuthCallback not working (#107)

Thank you for your answer @toppshttps://github.com/topps

I have already replaced the domain name with my own domain name. The URL is the same. So The call back URL should work but it is not working. So I suspect about my htaccess configuration.

I have changed the .htaccess file as in this issue #104#104 so do you think that would be the problem of social auth not working?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/107#issuecomment-213509766

@topps
Copy link
Member

topps commented Apr 23, 2016

On our vp.openlabyrinth.ca server, which has OAuth entailed but I had not set up any services, I spent a wee bit of time following our own, somewhat dated, notes on how to do this. I have made a few more comments in our forum at http://openlabyrinth.ca/forums/topic/oauth-setup-for-other-authentication-methods/ - Facebook and Twitter authentication are still easy to set up. I ran into problems with Google+. Happy to continue the discussion there, if anyone interested in pursuing this further. dt

From: Yusuf Yılmaz <[email protected]mailto:[email protected]>
Reply-To: olab/Open-Labyrinth <[email protected]mailto:[email protected]>
Date: Friday, April 22, 2016 at 10:55 AM
To: olab/Open-Labyrinth <[email protected]mailto:[email protected]>
Cc: David Topps <[email protected]mailto:[email protected]>, Mention <[email protected]mailto:[email protected]>
Subject: Re: [olab/Open-Labyrinth] loginOAuthCallback not working (#107)

Thank you for your answer @toppshttps://github.com/topps

I have already replaced the domain name with my own domain name. The URL is the same. So The call back URL should work but it is not working. So I suspect about my htaccess configuration.

I have changed the .htaccess file as in this issue #104#104 so do you think that would be the problem of social auth not working?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/107#issuecomment-213509766

@yusufyilmaz
Copy link
Author

I now tried to enable oAuth for facebook as well. But no chance to login. App ids secret is working good. But when the facebook or twitter return me to oopenlabyrinth I still see homepage. Callback url is not working somehow. I still suspect for my htaccess settings. as in issue #104 Do you any solution for that?

@yusufyilmaz
Copy link
Author

yusufyilmaz commented Apr 25, 2016

Ok!

I have done some debugging on home.php on line 60

public function action_loginOAuthCallback()

With the issue #104 I have confirmed it is a htacess issue. So I have changed my htacess file as

`
Options +FollowSymLinks

RewriteEngine On

<Files .*>
Order Deny,Allow
Deny From All

RewriteRule ^(.*)/$ /$1 [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^ index.php [L]

`

With this htacess, I was able to login with Twitter, Facebook and Google+ So I suggest to change htacess file as this.

Thank you for your help and you can close the issue if you like.

@topps
Copy link
Member

topps commented Apr 26, 2016

Thanks for all your debugging work on that Yusuf. As you may have gathered, there is no formal help desk support for OpenLabyrinth. I respond when able, which can be patchy. For some issues, this listserv often has useful suggestions, but everyone on here is also pretty busy so you can hit a dry spot with responses.

Your comments are most helpful. I thought that the OLab install routine checked for things like rewrite being turned on. Anyway, I’m glad that you found this. I will post these notes to the OLab forums in case they are helpful to others in your situation. Thanks again,

Dr David Topps
Professor, Family Medicine
University of Calgary

From: Yusuf Yılmaz
Reply-To: olab/Open-Labyrinth
Date: Monday, April 25, 2016 at 2:53 AM
To: olab/Open-Labyrinth
Cc: David Topps, Mention
Subject: Re: [olab/Open-Labyrinth] loginOAuthCallback not working (#107)

Ok!

I have done some debugging on home.php on line 60

public function action_loginOAuthCallback()

With the issue #104#104 I have confirmed it is a htacess issue. So I have changed my htacess file as

`Options +FollowSymLinks

Turn on URL rewriting

RewriteEngine On

Protect hidden files from being viewed

Order Deny,Allow
Deny From All

Redirect Trailing Slashes...

RewriteRule ^(.*)/$ /$1 [L,R=301]

Allow any files or directories that exist to be displayed directly

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^ index.php [L]

`

With this htacess, I was able to login with Twitter, Facebook and Google+ So I suggest to change htacess file as this.

Thank you for your help and you can close the issue if you like.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com//issues/107#issuecomment-214213978

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