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

Add account linking configs #4149

Closed
wants to merge 6 commits into from

Conversation

tung2744
Copy link
Contributor

@tung2744 tung2744 commented Apr 22, 2024

ref #4111
ref DEV-1206

Copy link
Collaborator

@louischan-oursky louischan-oursky left a comment

Choose a reason for hiding this comment

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

Let's add some tests on the newly added structs, like we did in pkg/lib/config/testdata/signup_flow_tests.yaml.

var _ = Schema.Add("AuthenticationFlowAccountLinking", `
{
"type": "object",
"required": [],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Omit required.

"properties": {
"oauth": {
"type": "array",
"items": { "$ref": "#/$defs/AccountLinkingOAuth" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Name the schema AuthenticationFlowAccountLinkOAuthItem

"required": ["alias", "oauth_claim", "user_profile", "action"],
"properties": {
"alias": { "type": "string" },
"oauth_claim": { "$ref": "#/$defs/AccountLinkingJSONPointer" },
Copy link
Collaborator

Choose a reason for hiding this comment

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

Name the schema AuthenticationFlowAccountLinkingJSONPointer

"alias": { "type": "string" },
"oauth_claim": { "$ref": "#/$defs/AccountLinkingJSONPointer" },
"user_profile": { "$ref": "#/$defs/AccountLinkingJSONPointer" },
"action": { "$ref": "#/$defs/AccountLinkingOAuthAction" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Name the schema AuthenticationFlowAccountLinkingAction

"type": "string",
"format": "json-pointer"
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add "required": ["pointer"]


type AccountLinkingOAuth struct {
Alias string `json:"alias,omitempty"`
OAuthClaim AccountLinkingJSONPointer `json:"oauth_claim,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be a pointer to AccountLinkingJSONPointer

type AccountLinkingOAuth struct {
Alias string `json:"alias,omitempty"`
OAuthClaim AccountLinkingJSONPointer `json:"oauth_claim,omitempty"`
UserProfile AccountLinkingJSONPointer `json:"user_profile,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be a pointer to AccountLinkingJSONPointer

@tung2744
Copy link
Contributor Author

Let me address the comments in #4159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants