FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(auth): Added code flow support for OIDC flow. by xil222 · Pull Request #1220 · firebase/firebase-admin-node · GitHub

feat(auth): Added code flow support for OIDC flow. - #1220

Merged
xil222 merged 17 commits into
masterfrom
xinxinxin-codeflow
May 25, 2021
Merged

feat(auth): Added code flow support for OIDC flow.#1220
xil222 merged 17 commits into
masterfrom
xinxinxin-codeflow

Conversation

xil222 commented Apr 6, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

RELEASE NOTE: Added code flow support for OIDC flow(previously only support idToken flow).
RELEASE NOTE: Defined OAuthResponseType for specifying responseType either idToken or code.
RELEASE NOTE: Defined two new error codes: INVALID_OAUTH_RESPONSETYPE and MISSING_OAUTH_CLIENT_SECRET.

hiranya911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good. I mostly had nits. There might be couple of edge cases that need better handling and some tests.

Comment thread src/auth/auth-config.ts Outdated
Comment thread src/auth/auth-config.ts Outdated
Comment thread src/auth/auth-config.ts Outdated
Comment thread src/auth/auth-config.ts Outdated
Comment thread src/auth/auth-config.ts Outdated
Comment thread src/auth/auth-config.ts Outdated
Comment thread src/auth/auth-config.ts Outdated
Comment thread test/unit/auth/auth-config.spec.ts Outdated
Comment thread test/unit/auth/auth-config.spec.ts Outdated

hiranya911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for making the changes. Looks pretty good. Just one last suggestion to cleanup the large loop in the implementation.

Comment thread src/auth/auth-config.ts Outdated
Comment thread test/unit/auth/auth-config.spec.ts Outdated

hiranya911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks. LGTM 👍

Comment thread src/auth/auth-config.ts
Comment thread src/auth/auth-config.ts Outdated
Comment thread src/auth/auth-config.ts Outdated
Comment thread src/auth/auth-config.ts
Comment thread src/auth/auth-config.ts
Comment thread src/auth/auth-config.ts Outdated

bojeil-google left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Change looks good. Just 2 minor issues.

Comment thread src/auth/auth-config.ts Outdated
Comment thread test/unit/auth/auth-api-request.spec.ts Outdated
enabled: true,
clientId: 'CLIENT_ID',
issuer: 'https://oidc.com/issuer',
clientSecret: 'CLIENT_SECRET',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I am concerned about legacy customers and would recommend keeping a test without clientSecret and responseType. Can you add new tests instead of modifying the existing ones?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I add tests for createOAuthIdpConfig and updateOAuthIdpConfig

xil222 requested a review from egilmorez April 27, 2021 23:32

egilmorez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

One optional nit if it's not too big a PITA to regen the reference.

Thanks!

Comment thread src/auth/index.ts
/**
* The interface representing OIDC provider's response object for OAuth
* authorization flow.
* We need either of them to be true, there are two cases:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This comment could be improved. Suggest:

" * One of the following must be true:

  • If code is set to true, then we are doing code flow.
  • If dToken is set to true, then we are doing ID token flow."

(Assuming that backticks are rendered as code font, and that "ID token flow" is a thing, separate from the literal idToken flag.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL