Jump to content

Sign in through Google


Lavo

Recommended Posts

  • Replies 375
  • Created
  • Last Reply

I've read through most of this topic... But couldn't quite wrap my head around one bit....

In order for you to 'Manage Google' to link your existing account to your Google acount... The e-mail on the existing account MUST be the same as your google account? Is that correct? Or can your IPB account e-mail not be your google e-mail and still link the accounts? (like facebook does)

Link to comment
Share on other sites


Hi Marcher,


As per instructions


The Redirect URIs *must* include {board_url}/interface/board/google.php AND {board_url}/interface/board/linkgoogle.php



where to add second url plz help



post-133862-0-53193700-1346266187_thumb.


Thanks and Regards


Saurabh




Resolved.. it showed me the option once I did edit again


Authorized Javascript Origins

One per line. For example: https://example.com it is by default http://mechanical-engineering.in is it ok?



Link to comment
Share on other sites


I've read through most of this topic... But couldn't quite wrap my head around one bit....



In order for you to 'Manage Google' to link your existing account to your Google acount... The e-mail on the existing account MUST be the same as your google account? Is that correct? Or can your IPB account e-mail not be your google e-mail and still link the accounts? (like facebook does)



....ugh. ok, order of exec.... for everybody nagging on it, and simply for legacy purposes, here's what happens.

User attempts to login through Google, being a guest.
I take their IPB related preferences, and send it to google as a returnable parameter using the details from google provided to me via settings from your API console, I send the OAuth2 Post Request to google with IPB API defaulting to the current 'user' on google's end if present.
If it returns an 'access_token', we GET the data for the current 'userinfo' array response from google with the same IPB API.
If you are not logged into google or have Google Login Prompt Type to forced in settings, I redirect for authorization to google, where it will return the user to one of these interface files, each literally is a responder replicating the area of IPB I need to be in setting up data, think IPC-Gateway style.
If google does not return 'userinfo' data, the user is thus returned the login screen.
if we have the 'userinfo' 'id' we then check locally for the user in members for any matching google_uid, if a match is found after authorizing through google in this manner for the unique google id, the user is logged in.
failing that, we test the 'userinfo' 'email', against the members table for a matching email, if that is found, the user is logged in.
failing that, we make a new member with the data from the 'userinfo' google has provided according to settings
Upon successful login, the users 'google_access_token', 'google_access_expires', 'google_refresh_token', and 'google_uid' fields are updated with the results from said calls.
The reasoning behind automatic and force is this, only when 'prompt' is 'force' and 'type' is 'offline' does google give the 'refresh_token' or 'google_refresh_token' locally needed to access the users data by validating the refresh token for an access token with their consent offline and 'keep' the user-data from google available for use in items like importing a photo from the google profile(maybe more later).
Existing members may unlink/relink their google account, and import thier google picture from the profile management tab in their settings, which is tied exclusively to 'userinfo' 'id' matching the google_uid and the user having one.

Hi Marcher,


As per instructions


The Redirect URIs *must* include {board_url}/interface/board/google.php AND {board_url}/interface/board/linkgoogle.php



where to add second url plz help



post-133862-0-53193700-1346266187_thumb.


Thanks and Regards


Saurabh



Click more options, add the second redirect uri(linkgoogle.php).
ensure the protocol and domain match what is used for login on your board.
Link to comment
Share on other sites


I just installed it... and tested it with one account... it gave me a user name


Saurabh_10546



from where this number came from?


If you can please also tell about Google login promt type Forced vs Automatic...? Which one to use..?



Google "Real Name/Display Name"
If you do not allow display names, I cannot do anything but provide the google 'name' if this Setting is Force Display Name Input, it MUST have something, change this.
see above, also note 'remember me' and 'anonymous' in terms of IPB selected is user preference upon login.
Link to comment
Share on other sites

That answers it...Thanks!!!

As long as the user is logged in to 'Manage Google', which they have to be anyway, it doesn't matter what their e-mail is, as you can link the google_uid to the logged in account...

If they aren't logged in, and their e-mail is the same as their google e-mail and they sign in using Google, you find their existing account and add the google_uid

If they aren't logged in, and their e-mail is different than their google e-mail and they sign in using Google, they get a new account.

Link to comment
Share on other sites


That answers it...Thanks!!!



As long as the user is logged in to 'Manage Google', which they have to be anyway, it doesn't matter what their e-mail is, as you can link the google_uid to the logged in account...



If they aren't logged in, and their e-mail is the same as their google e-mail and they sign in using Google, you find their existing account and add the google_uid



If they aren't logged in, and their e-mail is different than their google e-mail and they sign in using Google, they get a new account.



To further, logged-in users can remove and re-link exclusively by google_uid in the manage Google Edit Settings tab, as well as manually 'refresh' if type is Automatic in system settings for photo imports, see above on the whys and wherefores.
Link to comment
Share on other sites

Done and done, opted for the simple route for mobile over Javascript pop-up tricks in an effort to ensure accessibility, a check-box on the login form will allow this, while also retaining the rest of the options.
Manage Members will now show indication of the google linkage, with a link to the g+ account.

index.php?app=downloads&module=display&s
index.php?app=downloads&module=display&s
upload files and re-import hook for upgrade.... did some touch-ups to my classFileManagement loader method, only ever need that the once regardless of how many calls, also lowered the time-out below default as the response from google is usually extremely quick, but on slow times, more than a full second for a response can stack up rather quick with simultaneous usage.

Link to comment
Share on other sites

  • 1 month later...

Why would they need to log into the site again? That's the whole point if the google login, it creates an account if one doesn't exist or logs into one if linked to the google account used.

Yeah. Some buttons were not appearing here due to some other mod, but its fixed now.

Link to comment
Share on other sites

Hi,

I have tried this and it does not add the button on the site,

I have these

<table><tbody><tr><th> Redirect URIs:</th> <td> https://thatfreebie.com/forum/interface/board/linkgoogle.php https://thatfreebie.com/forum/interface/board/google.php http://thatfreebie.com/forum/interface/board/google.php https://thatfreebie.com/forum/interface/board/linkgoogle.php</td> </tr><tr><th> JavaScript origins:</th> <td> https://thatfreebie.com</td> </tr></tbody></table>

When i go to log in management i see no Google to enable.

Link to comment
Share on other sites

  • 2 weeks later...

Can someone help me with installation?

I've gone to the google page, clicked 'Create new Server key' but when I try entering mysite.com/{board_root}/interface/board/google.php I receive an error that says "Server key was not created. Please make sure your input was valid." and within the window itself it says "Invalid referrer." Do I need to be entering an IP address?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...