feat: add login_style attribute to ory_project_config#89
Merged
Conversation
0ba48d4 to
194e412
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new optional login_style attribute to the ory_project_config Terraform resource, enabling configuration of Ory Kratos login flow style via the project config JSON Patch API.
Changes:
- Adds
login_styleto the project config resource model + schema (validated asunifiedoridentifier_first) and maps it to/services/identity/config/selfservice/flows/login/style. - Extends patch-building and project-config reading logic to write/read the login style.
- Adds unit + acceptance tests, updates docs/templates, and provides example + manual test configs.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
internal/resources/projectconfig/resource.go |
Adds LoginStyle field, schema attribute, JSON patch generation, and read-back into state. |
internal/resources/projectconfig/build_patches_test.go |
Unit tests verifying JSON Patch generation for login_style (identifier_first/unified/null). |
internal/resources/projectconfig/resource_test.go |
Adds acceptance coverage for create/import/update/no-diff behavior for login_style. |
internal/resources/projectconfig/testdata/login_style.tf.tmpl |
Acceptance test config template for login_style. |
examples/resources/ory_project_config/resource.tf |
Example showing identifier-first login configuration. |
templates/resources/project_config.md.tmpl |
Documents “Login flow” coverage category. |
docs/resources/project_config.md |
Regenerated docs including the new attribute and example snippet. |
test/manual/login_style/main.tf |
Manual test config for applying login_style. |
test/manual/login_style/README.md |
Manual test instructions for create/update/import/destroy workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add support for toggling login flow style between 'unified' and 'identifier_first' via the login_style attribute on ory_project_config. This maps to the API path /services/identity/config/selfservice/flows/login/style. Closes #87
194e412 to
7de3e40
Compare
The default login_style is "unified" — added this to the schema description, example comments, and generated docs.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lovelinuxalot
approved these changes
Mar 11, 2026
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
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.
Description
Add support for toggling login flow style between
unifiedandidentifier_firstvia thelogin_styleattribute onory_project_config.This maps to the API path
/services/identity/config/selfservice/flows/login/style.Related Issues
Fixes #87
Type of Change
Checklist
make test)make format)Testing
buildPatches(identifier_first, unified, null)terraform plan,apply,import,destroyall verifiedWhat Changed
resource.goLoginStylefield to model, schema attribute withOneOfvalidator,buildPatchesentry,readProjectConfigentrybuild_patches_test.goresource_test.goTestAccProjectConfigResource_loginStyleacceptance testtestdata/login_style.tf.tmplexamples/resources/ory_project_config/resource.tftemplates/resources/project_config.md.tmpldocs/resources/project_config.mdUsage