ory / kratos

Next-gen identity server replacing your Auth0, Okta, Firebase with hardened security and PassKeys, SMS, OIDC, Social Sign In, MFA, FIDO, TOTP and OTP, WebAuthn, passwordless and much more. Golang, headless, API-first. Available as a worry-free SaaS with the fairest pricing on the market!
https://www.ory.sh/kratos/?utm_source=github&utm_medium=banner&utm_campaign=kratos
Apache License 2.0
10.81k stars 935 forks source link

feat: APIs for Ory Elements v1 #3934

Open aeneasr opened 1 month ago

aeneasr commented 1 month ago

Related issue(s)

Checklist

Further Comments

aeneasr commented 1 month ago

OK - we need a proper ID structure then in Ory Elements to deal with that but I agree

Am 24.05.2024 um 10:22 schrieb Patrik @.***>: @zepatrik commented on this pull request.

In text/message_system.go:

@@ -13,3 +13,11 @@ func NewErrorSystemGeneric(reason string) Message { }), } } + +func NewErrorSelfServiceNoMethodsAvailable() Message {

I don't think that we should add any element specific messages here. Kratos is headless, and should only care about the messages it uses. In the previous Ory elements version, we also had two sources of messages for translations, and had a small script to merge the two: https://github.com/ory/elements/blob/a93569f94b252ba193658199559f944162f9b6ab/scripts/generate-locales.ts#L53-L80 I strongly suggest to not add any messages here that are not part of this codebase, as it will become a nightmare to maintain down the road.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

zepatrik commented 1 month ago

Previously we used inline definitions, e.g. https://github.com/ory/elements/blob/a93569f94b252ba193658199559f944162f9b6ab/src/react-components/ory/user-auth-card.tsx#L131-L134 This is convenient for developing, as everything is in-place. For IDs we used kind of a namespace approach, but the main mechanism to ensure uniqueness of IDs is the tooling that comes with react-intl. It extracts all messages from the code and generates the "default" translation, from witch you then create all other translations.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 82.08000% with 112 lines in your changes missing coverage. Please review.

Project coverage is 78.31%. Comparing base (e0001b0) to head (11a28a1). Report is 1 commits behind head on master.

Files Patch % Lines
selfservice/strategy/passkey/passkey_login.go 82.22% 12 Missing and 12 partials :warning:
selfservice/strategy/webauthn/login.go 67.12% 13 Missing and 11 partials :warning:
selfservice/strategy/idfirst/strategy_login.go 73.86% 11 Missing and 12 partials :warning:
ui/node/attributes.go 69.38% 13 Missing and 2 partials :warning:
selfservice/strategy/oidc/strategy_login.go 78.43% 6 Missing and 5 partials :warning:
selfservice/strategy/password/login.go 78.26% 4 Missing and 6 partials :warning:
selfservice/flow/login/handler.go 91.66% 2 Missing :warning:
ui/node/node.go 87.50% 1 Missing and 1 partial :warning:
driver/config/config.go 90.90% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3934 +/- ## ========================================== + Coverage 78.21% 78.31% +0.09% ========================================== Files 363 367 +4 Lines 25486 25876 +390 ========================================== + Hits 19935 20265 +330 - Misses 4030 4070 +40 - Partials 1521 1541 +20 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.