BC oAuth
Google login reports incorrect identity (3 posts)

  1. Matt van Andel
    Posted 5 years ago #

    While setting up Google authentication, I noticed that Google was incorrectly reporting the site's identity as "bettercodes.org".

    I was able to fix this by updating /Classes/Google.php on line 63, from this:

    'xoauth_displayname' => 'bettercodes.org',

    to this:

    'xoauth_displayname' => $_SERVER['HTTP_HOST'],

    You might also consider adding an extra plugin setting at the top for "Site Identity"... in the event site admins want or need to enter custom values.

    BTW, I absolutely LOVE how clean the plugin is. Truly, your code is art. :-)


  2. Matt van Andel
    Posted 5 years ago #

    I was curious about a Google warning on login and did some extra digging around Google's oAuth documentation. It turns out that 'xoauth_displayname' is specifically only required for applications, and should be left out completely for websites. When I commented the line out, Google's "scary" warning disappeared and everything works perfectly.

    I also changed the scope from Google Contacts to Gmail, which makes more sense IMO.

    Gmail Scope: https://mail.google.com/mail/feed/atom/',

  3. bettercodes
    Plugin Author

    Posted 4 years ago #

    Hi Veraxus,

    thank your for your improvements. I will implement your changes asap and release a bugfix version of the plugin.

    It tastes so good that you like my code :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BC oAuth
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic