Social Login Keys / OAUTH

292 views
Skip to first unread message

Josh Linn

unread,
Apr 28, 2014, 9:40:37 AM4/28/14
to erpnext-dev...@googlegroups.com
Greetings, 
First allow me to thank all the developers for version 4, this is truly a "game changer".  Now that is out of the way, I need assistance with the Social Login Keys.  I have went to my Google API Console and setup my Project.  I have entered my API Code and Secret into ERPNext, all is well.  When I try to login using my new Google Button, I get an error about my redirect uri.  The text on the screen is cut off and I can find no reference to what string should be listed in my redirect uri.

Thank You. 
Message has been deleted

Josh Linn

unread,
Apr 30, 2014, 8:47:58 AM4/30/14
to erpnext-dev...@googlegroups.com
Ok, so maybe I didn't post what I was after clearly enough.

As you can see, the Redirect URI's are not correct and I can find no documentation of the correct settings.  Could one of the development staff please be so kind to jump in and give me some assistance please?

Thank You.

rushabh

unread,
May 1, 2014, 12:49:22 AM5/1/14
to erpnext-dev...@googlegroups.com
Josh, this is still beta. Can you post the screenshot of the error page (that will be more helpful)

@Anand, can you please post a wiki page on this?

Anand Doshi

unread,
May 6, 2014, 1:46:29 PM5/6/14
to ERPNext Developer's Forum
Hi Josh,

Please have a look at slide 34 onwards: https://frappe.io/blog/open-day/open-day-february-2014

We will document it better soon.

Thanks,
Anand.


On Wed, Apr 30, 2014 at 6:12 PM, Josh Linn <jo...@linnsystems.net> wrote:
No takers huh... Okay, maybe my post wasn't clear enough.


--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/7c65e6db-a569-4ce8-8ee5-0b9497225532%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Josh Linn

unread,
May 6, 2014, 2:04:30 PM5/6/14
to erpnext-dev...@googlegroups.com
Hello and thank you for your replies.  I would have been back sooner but I have been out of town for my work.  To follow up, I did find the proper redirect uri (in the source code) and entered it in the Google API console.  I then added my google user id in my settings and...

No error message but no login as well.  I am returned to my ERPNext home page without being logged in.  So, I went back and removed my google id and replaced it with my google plus id.  Still no go, as before I am returned back to the ERPNext home page.

I will be around here a few days this week and I am more than happy to help debug what I can.  I think tonight I will start my instance in dev mode so I can read the output as google tries to auth me.

Thank you.


On Monday, April 28, 2014 8:40:37 AM UTC-5, Josh Linn wrote:

Anand Doshi

unread,
May 6, 2014, 11:04:29 PM5/6/14
to erpnext-dev...@googlegroups.com
Hi. 

To login inside the app you need to be a system user. Else you get logged in for website access like forums and shopping cart. Ask an existing system manager to login and change user type to system manager from setup / users. 

Thanks
Anand. 

Sent from phone
--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

Josh Linn

unread,
May 22, 2014, 3:28:16 PM5/22/14
to erpnext-dev...@googlegroups.com
Hello, I just wanted to check in and let you know that I resolved my issue.  I am running this instance with nginx and supervisor and have a 301 redirect in my nginx configuration to redirect all to https.  That was my first problem as my nginx config was redirecting all request on http to "https://mydomain.com" therefore the callback from Google (http://mydomain.com/api/method/frappe.templates.pages.login.login_via_google) were all being redirected to https://mydomain.com.  

Once I resolve my nginx configuration, I stumbled across problem two: after the google login, frappe is redirecting to https://mydomain.com/app and I get a 404 "file not found" error.  I again modified my nginx configuration, this time to redirect /app to /desk and all is working correctly now.  However, looking through the frappe code, in frappe/templates/pages/login.py on line 170 I found where frappe is redirecting to /app.  I am not completely "up to par" on my python programming but shouldn't this instead redirect to /desk?

I did not raise a bug report on this because I did not know if I was correct.  Either way, thank you again for your time and help.
Josh

Reply all
Reply to author
Forward
0 new messages