Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6775121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:52:09+00:00 2026-05-26T15:52:09+00:00

I am attempting to retrieve the google email address when making an OAuth2.0 call

  • 0

I am attempting to retrieve the google email address when making an OAuth2.0 call to google, using EveryAuth NPM lib. Has anyone managed to get the email to return using EveryAuth?

everyauth.google
  .entryPath('/auth/google')
  .callbackPath('/auth/google/callback')
  .appId('216450162097.apps.googleusercontent.com')
  .appSecret('8b6yf2nznWHgAu7iKNyGn-0F')
  .scope(['https://www.googleapis.com/auth/userinfo.email'])
  .findOrCreateUser( function(session, userAttributes) {
    console.log(userAttributes);  })
  .redirectPath('/'); 

The scope: https://www.googleapis.com/auth/userinfo.email causes exception:

Error:
Error
401
(Not Found)!!1

display:block;height:55px;margin:0 0 -7px;width:150px}* > #g{margin-left:-2px}#g img{visibility:hidden}* html #g img{visibility:visible}*+html #g img{visibility:visible}

Google

401.
That's an error.

There was an error in your request.
That's all we know.

at [object Object].fail (/Users/thegoleffect/Documents/Projects/Spoondate/nitrous/node_modules/everyauth/lib/promise.js:50:15)
at EventEmitter. (/Users/thegoleffect/Documents/Projects/Spoondate/nitrous/node_modules/everyauth/lib/modules/google.js:58:15)
at EventEmitter.emit (events.js:67:17)
at EventEmitter._respond (/Users/thegoleffect/Documents/Projects/Spoondate/nitrous/node_modules/everyauth/node_modules/restler/lib/restler.js:127:12)
at EventEmitter._fireEvents (/Users/thegoleffect/Documents/Projects/Spoondate/nitrous/node_modules/everyauth/node_modules/restler/lib/restler.js:131:52)
at /Users/thegoleffect/Documents/Projects/Spoondate/nitrous/node_modules/everyauth/node_modules/restler/lib/restler.js:115:19
at IncomingMessage. (/Users/thegoleffect/Documents/Projects/Spoondate/nitrous/node_modules/everyauth/node_modules/restler/lib/restler.js:205:5)
at IncomingMessage. (/Users/thegoleffect/Documents/Projects/Spoondate/nitrous/node_modules/everyauth/node_modules/restler/lib/restler.js:113:32)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:52:09+00:00Added an answer on May 26, 2026 at 3:52 pm

    According to google the scope and the api end point are slightly different, which confused me a little. If you make the change to your google.js to the following, the google Auth2.0 api will return the email address of the user.

      .fetchOAuthUser( function (accessToken) {
        var promise = this.Promise();
        rest.get('https://www.googleapis.com/userinfo/email', {
          query: { oauth_token: accessToken, alt: 'json' }
        }).on('success', function (data, res) {
          console.log(data);
          var oauthUser = { email: data };
          promise.fulfill(oauthUser);
        }).on('error', function (data, res) {
          console.log(data);
          promise.fail(data);
        });
        return promise;
      });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to retrieve the MAC address of an IPv6 host in C#.
I'm currently attempting to retrieve a list of objects from my database using jQuery.
I am attempting to retrieve jpeg and jpg files using the following statement: string[]
I'm attempting to retrieve the document text in Notepad++ using SendMessage in C#. Below
I'm attempting to retrieve the user name and client machine name of the person
I'm attempting to retrieve data from a SolarWinds network performance database (MS SQL 2005)
When attempting to use HttpWebRequest to retrieve a page from my dev server, I
I am attempting to retrieve a list of objects from Entity Framework via WCF,
I am attempting to retrieve information on all the various monitors (and their adapters)
I'm attempting to retrieve a url parameter within a CometActor to validate that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.