Aggregated open metadata endpoint to be used in orchestrated user flows #1162
brionmario
started this conversation in
Ideas
Replies: 1 comment 4 replies
-
|
I have one concern on the same response object, 'is_registration_flow_enabled' is part of the ou and application. So we are expecting the client to perform logic programming to check whether the registration is enabled or not. I think this is not correct. The backend should return resolved values. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
Currently, different parts of our application rely on multiple endpoints to fetch metadata required for user journeys (i.e sign-in, sign-up & recovery).
For example:
ex:
This leads to multiple network requests during sign-in, sign-up, and recovery flows, increasing latency and complexity in the front-end code. It also makes consistent resolution of themes, i18n, and application settings challenging.
Also, if a developer wants to build their own portals with our APIs rather than using the SDKs, this will not provide a good DX.
Important
The current
/brandingAPI is primarily focused on theming (colors, layouts, visual preferences) rather than comprehensive branding (which typically includes brand identity, guidelines, and marketing assets). The term "branding" may be misleading - we're actually managing UI themes and visual presentation configurations.Why is this needed
An aggregated endpoint for sign-in, sign-up, and recovery flow metadata would:
Proposed Solution
Introduce a new aggregated endpoint that provides all necessary metadata for authentication flows in a single request. The response includes application and OU references to themes and layouts, along with the complete definitions of all available themes and layouts.
Sample API Structure
Query Parameters
app_id550e8400-e29b-41d4-a716-446655440000languageen,es,frnamespacelogin,common,recoveryResponse
{ "is_registration_flow_enabled": true, "application": { "id": "60a9b38b-6eba-9f9e-55f9-267067de4680", "name": "My Web Application", "logo_url": "https://myapp.example.com/logo.png", "url": "https://myapp.example.com", "tos_uri": "https://myapp.example.com/terms", "policy_uri": "https://myapp.example.com/privacy", "cookie_policy_uri": "https://myapp.example.com/cookies" }, "ou": { "id": "fe447a2f-29c5-4e33-ac8f-d77be15fdb32", "handle": "default", "name": "Default Organization Unit", "logo_url": "https://myapp.example.com/logo.png", "tos_uri": "https://myapp.example.com/terms", "policy_uri": "https://myapp.example.com/privacy", "cookie_policy_uri": "https://myapp.example.com/cookies" }, "design": { "theme": { // resolved layout }, "layout": { // resolved layout } }, "i18n": { "languages": [ "en-US", "fr-FR" ], "language": "en", "translations": { // translate strings } } }Response Structure Explanation
application.themes: Array of theme IDs configured for this applicationapplication.layout: Layout ID configured for this applicationou.themes: Array of theme IDs configured for the organizational unitou.layout: Layout ID configured for the organizational unitdesign.layouts: Array containing full definitions of all available layouts (referenced by application/OU)design.themes: Array containing full definitions of all available themes (referenced by application/OU)This reference-based approach allows:
designarraysBenefits
Implementation Notes
/branding,/application,/ou, and/i18nAPIs will continue to exist for management operations (CRUD)design.layoutsanddesign.themesarraysBeta Was this translation helpful? Give feedback.
All reactions