Social Login Keys / OAUTH

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. 



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/1c955c4a-f3cf-46dd-9ff0-787048d668aa%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
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-forum+un…@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.
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.

On Monday, April 28, 2014 8:40:37 AM UTC-5, Josh Linn wrote:
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. 



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3c6e11cd-07a0-4a33-a370-3ba77239216c%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
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?

On Wednesday, April 30, 2014 6:17:58 PM UTC+5:30, Josh Linn wrote:
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.

On Monday, April 28, 2014 8:40:37 AM UTC-5, Josh Linn wrote:
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. 



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/d182ca86-d279-4b5a-aac9-1437dc8255b0%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
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-forum+un…@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.




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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/CAAQzbF2%3DwpAk1%3DxhoemAgBQtmhp_HHrxVWeiRrT%3DJYW-LPWdrw%40mail.gmail.com.

    For more options, visit https://groups.google.com/d/optout.
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:
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. 



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/6804d4d3-4b25-4fc6-a587-141d5e31d0f7%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
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

On 06-May-2014, at 11:34 pm, Josh Linn <jo...@linnsystems.net> wrote:

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:
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. 



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/6804d4d3-4b25-4fc6-a587-141d5e31d0f7%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/FBBE8DE4-813B-4DA6-BEA7-12C29DB97B18%40iwebnotes.com.

    For more options, visit https://groups.google.com/d/optout.
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



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/997c00f7-baca-401d-9fd0-968ceb2f7050%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

Please find my earlier post to fix this issue. May come in handy. Took a lot of time to figure this out and finally worked for me.