Hi. I need a feature and I had already written so...
# contributors
a
Hi. I need a feature and I had already written some code for it. However before pushing I want to discuss it here. The problem: I am using hydra + kratos & custom UI. I have an application
A
that logs users in using hydra with oauth2. When hydra redirects them to the login challenge url it only passes
login_challenge
query param and nothing else. My application
A
and the custom UI are on different domains so I can't share cookies. My application
A
is now on dark theme and my custom UI is on light theme by default. The only way to share the initial theme for my custom UI is to pass some query param to the login page. The solution: when initiating the oauth2 flow I can pass custom query params like this:
Copy code
<http://ory.hydra.com/oauth2/auth>
?client_id=....
&scope=...
&redirect_uri=...
&custom_theme_mode=dark
&custom_lang=ar
When hydra redirects to my custom UI it will redirect to the following:
Copy code
<http://my-custom-ui.com/login>
?login_challenge=...
&custom_theme_mode=dark
&custom_lang=ar
@magnificent-energy-493 sorry to disrupt I need this feature asap, so, can you please just read and if approved I can directly push the pr.
m
Hello @acceptable-dress-21970 Sorry I can't help with that - if this feature is time critical I would recommend to get a support agreement with Ory. With a support agreement we can allocate developer resources to review, test, merge, and maintain the feature you need. If you have budget for a support agreement please reach out here: https://ory.sh/contact or to sales@ory.sh
d
Hello @acceptable-dress-21970 if yours apps are on the same root domain like example.com: app.example.com and login.example.com you can set a cookie throught the root domain with the following cookie config: name="asyouwant" value="asyouwant" domain=".example.com" secure=true sameSite="None"
a
Thanks @delightful-noon-48365 You might have not noticed this line in the message:
My application
A
and the custom UI are on different domains so I can't share cookies.
d
I have noticed this info from your message but maybe it was only differents sub domains that why I write to ensure this