• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

[nodebb-plugin-sso-google] Google Accounts Integration

Scheduled Pinned Locked Moved NodeBB Plugins
14 Posts 8 Posters 6.8k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #1

    Installation

    $ npm install nodebb-plugin-sso-google
    

    Activate the plugin, restart NodeBB, enter in the API credentials, and restart again for good measure.

    Changelog

    ###v0.2.0

    • Updated for NodeBB v0.4.x compatibility -- API credentials will need to be re-entered.
    1 Reply Last reply
    2
  • N Offline
    N Offline
    Nicekiwi
    wrote on last edited by Nicekiwi
    #2

    There seems to be an issue with this and the Google Developer Console, the callback URL is no longer /auth/google/callback but /oauth2callback.

    Or am I doing something wrong? The instructions on the plugin should be updated.

    For example: https://community.ag-aus.org/login

    Hưng Thành NguyễnH 1 Reply Last reply
    0
  • Hưng Thành NguyễnH Offline
    Hưng Thành NguyễnH Offline
    Hưng Thành Nguyễn
    replied to Nicekiwi on last edited by
    #3

    @Nicekiwi your config was wrong. How did you config it? And what is error message from google?

    You can see everything is working fine in here:
    http://demo.chuyentranphu.com/login

    1 Reply Last reply
    0
  • Peter Zhe ChenP Offline
    Peter Zhe ChenP Offline
    Peter Zhe Chen
    wrote on last edited by Peter Zhe Chen
    #4

    I got 401 error with Google.401.

    That’s an error.

    Error: invalid_client

    no application name

    In google developer console, I setup web application with following parameters:
    REDIRECT URIS http://chrome.nodebb.com/auth/google/callback
    JAVASCRIPT ORIGINS http://chrome.nodebb.com

    Request Details
    from_login=1
    response_type=code
    scope=https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
    redirect_uri=http://chrome.nodebb.com/auth/google/callback
    as=-4f3302720361ea3b
    client_id=XXXXXXXX
    hl=en-GB

    Twitter and Facebook are working fine for me.

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #5

    Hey there @Peter-Zhe-Chen ! This StackOverflow answer may help you out 🙂

    Peter Zhe ChenP 1 Reply Last reply
    0
  • Peter Zhe ChenP Offline
    Peter Zhe ChenP Offline
    Peter Zhe Chen
    replied to julian on last edited by
    #6

    @julian Thanks! That works! I wish some of these can be included in the docs? Like javascript origins is not mentioned as well.

    1 Reply Last reply
    0
  • G Offline
    G Offline
    Guiri
    wrote on last edited by
    #7

    It looks like you're already using OAuth so I assume this won't affect the plugin?
    https://support.google.com/accounts/answer/6135882

    1 Reply Last reply
    0
  • A Offline
    A Offline
    aya
    wrote on last edited by
    #8

    I can not understand the reason for this error:

    Error: invalid_client
    
    The OAuth client was not found.
    Request Details
    
        scope=https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
        response_type=code
        redirect_uri=https://example.com/auth/google/callback
        client_id= 174957913510-88rfl4p89j2divmjspgirnqgpr3ccbbm.apps.
    

    Client created all the required information he has

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #9

    Is url correctly set in config.json?

    A 1 Reply Last reply
    0
  • A Offline
    A Offline
    aya
    replied to julian on last edited by aya
    #10

    @julian said:

    Is url correctly set in config.json?

    Yes (instead example.com set my domain, of course)

    grep 'url' nodebb/config.json 
        "url": "https://example.com",
    
    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #11

    Do you have the Google+ API enabled via your Google Apps Console?

    A 1 Reply Last reply
    0
  • A Offline
    A Offline
    aya
    replied to julian on last edited by aya
    #12

    @julian
    Yes.

    This API is enabled:

    BigQuery API 	
    Cloud Debugger API 	
    Debuglet Controller API 	
    Google Cloud Logging API 	
    Google Cloud SQL 	
    Google Cloud Storage 	
    Google Cloud Storage JSON API 
    Google+ API 
    

    I could be wrong, but I have all the settings are correct

    P.S. i use:
    sso plugin: https://github.com/julianlam/nodebb-plugin-sso-google
    NodeBB v1.0.0.

    P.P.S.
    I created a new project in the Google Apps Console. Now everything is working. Probably somewhere I did was wrong 🙂

    1 Reply Last reply
    1
  • Juan G.J Offline
    Juan G.J Offline
    Juan G.
    wrote on last edited by Juan G.
    #13

    There is a helpful video: Enabling Google SSO for your NodeBB forum - YouTube, which is good, although I needed additional steps, basically Google Admin.

    Just in case it's useful for some people, using Google Apps accounts, after installing nodebb-plugin-sso-google, activating it, and reloading, I needed to go -with the admin account- to Google Admin:

    https://admin.google.com > More controls > Apps > Additional Google services > Settings for specific organizational units > example.com > Page 2 > Google Developers Console > On

    Then to Google APIs:

    https://console.developers.google.com/cloud-resource-manager

    Click on Google APIs

    View All > Social > Google+ API > Enable > Create

    Project name: Example Login

    Project ID: example-login

    Organization: example.com

    Create > Enable > Create credentials

    Which API are you using?: Google+ API

    Where will you be calling the API from?: Web server (e.g. node.js, Tomcat)

    What data will you be accessing?. (x) User data

    What credentials do I need?

    Create an OAuth 2.0 client ID

    Name: Web client 1

    Authorized JavaScript origins: https://example.com

    Authorized redirect URIs: https://example.com/community/auth/google/callback

    Create client ID

    Set up the OAuth 2.0 consent screen

    Email address: [email protected]

    Product name shown to users: Example Login

    More customization options

    Homepage URL: https://example.com

    Product logo URL: https://example.com/content/images/logo-120x120.png

    Privacy policy URL: https://example.com/privacy/

    Continue > Download credentials > Download > Done

    Web client 1

    Client ID: (...)

    Client secret: (...)

    Creation date: (...)

    And finally to the NodeBB plugin:

    NodeBB Admin > Social Authentication > Google

    Enter Client ID, Secret

    [yes] Skip email verification for people who register using SSO?

    Save

    Reload NodeBB

    Tested, it works well.

    1 Reply Last reply
    0
  • phenomlabP Offline
    phenomlabP Offline
    phenomlab
    wrote on last edited by
    #14

    @julian said in [nodebb-plugin-sso-google] Google Accounts Integration:

    npm install nodebb-plugin-sso-google

    Are there any plans for this plugin to work with 1.17 ?

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development