Comments (3)
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.
It seems that this only occurs, when my redirect_uri
is localhost
.
from google-auth-library-nodejs.
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:
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)
- Use ENVAR for service account impersonation
- Occasional timeout when requesting Google ID Token Verify HOT 2
- Allow passing in AWS credentials instead of only using environment variables HOT 2
- Type definitions in google-auth-library >= 9.5.0 incompatible with client libraries HOT 3
- GaxiosError: Failed to retrieve verification certificates: request to https://www.googleapis.com/oauth2/v1/certs failed HOT 1
- refactor!: Move Base `AuthClient` Types to `authclient.ts` HOT 2
- samples for external-account: should acquire ADC for url-sourced creds failed HOT 2
- samples for external-account: should acquire ADC for AWS creds failed HOT 2
- Client args type error for GCP HOT 4
- samples for external-account: should acquire ADC for file-sourced creds failed HOT 2
- Facing timeout issue for https://www.googleapis.com/oauth2/v4/token while generating oauth access token using google-auth-library HOT 7
- Ht
- G
- How to handle google auth with react and node js api HOT 1
- How to use nodejs api of google auth in axios fetch? HOT 3
- ToC for Reference Documentation is broken HOT 1
- error: FetchError: request to https://www.googleapis.com/oauth2/v1/certs failed, reason: connect ETIMEDOUT 142.251.43.10:443 HOT 1
- error: FetchError: request to https://oauth2.googleapis.com/token failed, reason: connect ETIMEDOUT 172.217.160.74:443 HOT 1
- use getToken error: FetchError: request to https://oauth2.googleapis.com/token failed, reason: connect ETIMEDOUT 172.217.160.74:443
- exchanging code for tokens: GaxiosError: request to https://oauth2.googleapis.com/token failed,
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-auth-library-nodejs.