-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: get rid of createScopedRequired #318
Conversation
I am very confused and do not know why its showing all these commits. "get rid of createScopedRequired" should be the only one. |
Codecov Report
@@ Coverage Diff @@
## next #318 +/- ##
=========================================
+ Coverage 94.6% 94.84% +0.24%
=========================================
Files 14 14
Lines 853 854 +1
Branches 193 199 +6
=========================================
+ Hits 807 810 +3
+ Misses 46 44 -2
Continue to review full report at Codecov.
|
@@ -1229,6 +1230,13 @@ it('should accept credentials to get a client', async () => { | |||
assert.equal(client.email, 'hello@youarecool.com'); | |||
}); | |||
|
|||
it('should allow passing scopes to get a client', async () => { | |||
const scopes = ['http://examples.com/is/a/scope']; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
README.md
Outdated
@@ -52,12 +52,14 @@ Rather than manually creating an OAuth2 client, JWT client, or Compute client, t | |||
|
|||
For example, a JWT auth client will be created when your code is running on your local developer machine, and a Compute client will be created when the same code is running on Google Cloud Platform. | |||
|
|||
The code below shows how to retrieve a default credential type, depending upon the runtime environment. The createScopedRequired must be called to determine when you need to pass in the scopes manually, and when they have been set for you automatically based on the configured runtime environment. | |||
The code below shows how to retrieve a default credential type, depending upon the runtime environment. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
**BREAKING CHANGE**: Renames the `credential` field on the `ADCResponse` to `client`. Previous code like this: ```js const res = await auth.getApplicationDefault(); const client = res.credential; ``` Now will look like this: ```js const res = await auth.getApplicationDefault(); const client = res.client; ```
**BREAKING CHANGE**: Many methods that previously returned `null` may now return `undefined`. We had types that were optional or null all over the codebase. Cleaned this up by removing any null type that was already optional.
**BREAKING CHANGE**: Renames the `credential` field on the `ADCResponse` to `client`. Previous code like this: ```js const res = await auth.getApplicationDefault(); const client = res.credential; ``` Now will look like this: ```js const res = await auth.getApplicationDefault(); const client = res.client; ```
test/test.googleauth.ts
Outdated
@@ -1233,6 +1233,13 @@ it('should allow passing scopes to get a client', async () => { | |||
assert.equal(client.scopes, scopes); | |||
}); | |||
|
|||
it('should allow passing a scope to get a client', async () => { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
assert.equal(client.scopes, scopes); | ||
}); | ||
|
||
it('should allow passing a scope to get a client', async () => { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Resolves #264