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 createAuthenticator mutation #4272

Merged
merged 10 commits into from
Jun 7, 2024
Merged

Conversation

tung2744
Copy link
Contributor

@tung2744 tung2744 commented Jun 4, 2024

ref DEV-1360


var authenticatorDef = graphql.NewInputObject(graphql.InputObjectConfig{
Name: "IdentityDefinition",
Description: "Definition of an identity. This is a union object, exactly one of the available fields must be present.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

an authenticator, not an identity.

},
"definition": &graphql.InputObjectFieldConfig{
Type: graphql.NewNonNull(authenticatorDef),
Description: "Definition of the new identity.",
Copy link
Collaborator

Choose a reason for hiding this comment

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

the new authenticator.

@@ -1,1675 +0,0 @@
""""""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do not delete this file in this commit.


"""Password authenticator definition."""
password: AuthenticatorDefinitionPassword
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I prefer the following shape. What do you think?

input AuthenticatorDefinition {
  kind: AuthenticatorKind!
  """We will check type, and determine which field we will then look at."""
  type: AuthenticatorType!
  oobOtpEmail: AuthenticatorDefinitionOOBOTPEmail
  oobOtpSMS: AuthenticatorDefinitionOOBOTPSMS
  password: AuthenticatorDefinitionPassword
}

input AuthenticatorDefinitionOOBOTPEmail {
  email: String!
}

input AuthenticatorDefinitionOOBOTPSMS {
  phone: String!
}

input AuthenticatorDefinitionPassword {
  password: String!
}

@tung2744
Copy link
Contributor Author

tung2744 commented Jun 7, 2024

@louischan-oursky Updated, thanks!

@louischan-oursky louischan-oursky self-requested a review June 7, 2024 09:47
@louischan-oursky louischan-oursky merged commit 7034adf into authgear:main Jun 7, 2024
7 checks passed
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.

2 participants