Skip to content
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

Can OAuth2Client.verifyIdToken() really return null? #487

Closed
gitgrimbo opened this issue Oct 15, 2018 · 1 comment
Closed

Can OAuth2Client.verifyIdToken() really return null? #487

gitgrimbo opened this issue Oct 15, 2018 · 1 comment
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@gitgrimbo
Copy link

The docs:

https://googleapis.github.io/google-auth-library-nodejs/classes/_auth_oauth2client_.oauth2client.html#verifyidtoken

say verifyIdToken() can return null in the returned Promise:

Promise<LoginTicket | null>

but that doesn't seem possible.

This is causing (incorrect?) warnings in my TypeScript project.


The method:

verifyIdToken(options: VerifyIdTokenOptions): Promise<LoginTicket|null>;

supposedly can return null in the Promise.

The verifyIdToken() method calls:

const login = this.verifySignedJwtWithCerts(

which calls the following code (JSDoc shown) (no mention of null in the JSDoc, and also seemingly no way for the method to return null):

* @return Returns a LoginTicket on verification.

@JustinBeckwith
Copy link
Contributor

Fair point! That should never return null. Fix is over at #488

@JustinBeckwith JustinBeckwith added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Oct 15, 2018
@ghost ghost removed in progress priority: p2 Moderately-important priority. Fix may not be included in next release. labels Oct 15, 2018
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants