-
Notifications
You must be signed in to change notification settings - Fork 396
feat(auth): Added code flow support for OIDC flow. #1220
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
Merged
+396
−17
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d6681cc
OIDC codeflow support
xil222 3a925a5
improve configs to simulate the real cases
xil222 4f2e7bc
update for changes in signiture
xil222 3aacc80
Merge branch 'xinxinxin-codeflow' of https://github.com/firebase/fire…
xil222 4b86338
resolve comments
xil222 e565db3
improve validator logic
xil222 0a36501
remove unnecessary logic
xil222 92202e6
Merge branch 'master' into xinxinxin-codeflow
xil222 01f0c34
add tests and fix errors
xil222 14034d2
Merge branch 'xinxinxin-codeflow' of https://github.com/firebase/fire…
xil222 4fb8597
add auth-api-request rests
xil222 82ea5bb
Merge branch 'master' into xinxinxin-codeflow
xil222 b87a4ce
Merge branch 'master' into xinxinxin-codeflow
xil222 5dd52df
Merge branch 'master' into xinxinxin-codeflow
xil222 0a0cd0d
Merge branch 'master' into xinxinxin-codeflow
xil222 e824a41
Merge branch 'master' into xinxinxin-codeflow
xil222 2db147e
Merge branch 'master' into xinxinxin-codeflow
xil222 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1289,6 +1289,25 @@ export namespace auth { | |
callbackURL?: string; | ||
} | ||
|
||
/** | ||
* The interface representing OIDC provider's response object for OAuth | ||
* authorization flow. | ||
* We need either of them to be true, there are two cases: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment could be improved. Suggest: " * One of the following must be true:
(Assuming that backticks are rendered as code font, and that "ID token flow" is a thing, separate from the literal |
||
* If set code to true, then we are doing code flow. | ||
* If set idToken to true, then we are doing idToken flow. | ||
*/ | ||
export interface OAuthResponseType { | ||
/** | ||
* Whether ID token is returned from IdP's authorization endpoint. | ||
*/ | ||
idToken?: boolean; | ||
|
||
/** | ||
* Whether authorization code is returned from IdP's authorization endpoint. | ||
*/ | ||
code?: boolean; | ||
} | ||
|
||
/** | ||
* The [OIDC](https://openid.net/specs/openid-connect-core-1_0-final.html) Auth | ||
* provider configuration interface. An OIDC provider can be created via | ||
|
@@ -1321,6 +1340,16 @@ export namespace auth { | |
* [spec](https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation). | ||
*/ | ||
issuer: string; | ||
|
||
/** | ||
* The OIDC provider's client secret to enable OIDC code flow. | ||
*/ | ||
clientSecret?: string; | ||
|
||
/** | ||
* The OIDC provider's response object for OAuth authorization flow. | ||
*/ | ||
responseType?: OAuthResponseType; | ||
} | ||
|
||
/** | ||
|
@@ -1403,6 +1432,17 @@ export namespace auth { | |
* configuration's value is not modified. | ||
*/ | ||
issuer?: string; | ||
|
||
/** | ||
* The OIDC provider's client secret to enable OIDC code flow. | ||
* If not provided, the existing configuration's value is not modified. | ||
*/ | ||
clientSecret?: string; | ||
|
||
/** | ||
* The OIDC provider's response object for OAuth authorization flow. | ||
*/ | ||
responseType?: OAuthResponseType; | ||
} | ||
|
||
/** | ||
|
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.