Code Monkey home page Code Monkey logo

Comments (3)

murgatroid99 avatar murgatroid99 commented on May 22, 2024

According to the OpenID documentation, access_type is optional and if it is absent, the server behaves as though it was "offline", which is exactly the behavior that the example indicates.

What is this "prompt asking for offline access"? I don't see anything like that in this library.

from google-auth-library-nodejs.

Cir0X avatar Cir0X commented on May 22, 2024

This prompt from google:

It seems that this only occurs, when my redirect_uri is localhost.

from google-auth-library-nodejs.

JustinBeckwith avatar JustinBeckwith commented on May 22, 2024

Greetings @Cir0X! I'm having a little trouble reproducing this one. I am using the example here:
https://github.com/google/google-auth-library-nodejs/blob/next/examples/oauth2.js

I changed the sample to use this for url generation, and even tried to force the consent dialog:

// Generate the url that will be used for the consent dialog.
const authorizeUrl = oAuth2Client.generateAuthUrl({
  access_type: 'offline',
  scope: [
    'https://www.googleapis.com/auth/userinfo.profile',
    'https://www.googleapis.com/auth/devstorage.read_write',
    'https://www.googleapis.com/auth/plus.me',
    'https://www.googleapis.com/auth/compute'
  ],
  prompt: 'consent select_account'
});

This generates a consent dialog, but nowhere does it ask me if I should allow offline access:

image

Note, my redirect_uri is set to localhost:3000. I am also using the alpha npm release of our 1.0 library, which you can try out at npm install [email protected].

Given that this issue is nearly a year old, I'm going to go ahead and close it out. if you can include detailed instructions on how to reproduce it - I'd be happy to take a look :)

from google-auth-library-nodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.