zitadel / typescript

Typescript packages and application to showcase the ZITADEL resource API
https://typescript-login.vercel.app
MIT License
54 stars 27 forks source link

[Bug]: Custom logo throws 500 error #183

Open mffap opened 1 month ago

mffap commented 1 month ago

Preflight Checklist

Version

No response

Describe the problem caused by this bug

Error: Invalid src prop (https://b2b-demo-rbxajm.zitadel.cloud/assets/v1/170084137439330561/policy/label/logo-dark-189254589529194753) on next/image, hostname "b2b-demo-rbxajm.zitadel.cloud" is not configured under images in your next.config.js See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host

To reproduce

I have a custom logo configured. This error appears when calling up http://localhost:3000 in dev mode.

Screenshots

No response

Expected behavior

No response

Relevant Configuration

No response

Additional Context

No response

mu-irfan commented 1 month ago

Hey, gonna fix it, can you assign it to me

hifabienne commented 1 month ago

@mu-irfan thanks for taking this over, I assigned you to the issue.

@mffap quick question, did you set the trusted domain on your instance? I didn't have a look on my test setup what the exact error was, but at the beginning I also couldn't load the logo, I tested with the deploy to vercel, and either the problem was that my env var wasn't set correctly or the trusted domain. https://zitadel.com/docs/apis/resources/admin/admin-service-add-instance-trusted-domain

mffap commented 1 month ago

@mu-irfan thanks for taking this over, I assigned you to the issue.

@mffap quick question, did you set the trusted domain on your instance? I didn't have a look on my test setup what the exact error was, but at the beginning I also couldn't load the logo, I tested with the deploy to vercel, and either the problem was that my env var wasn't set correctly or the trusted domain. https://zitadel.com/docs/apis/resources/admin/admin-service-add-instance-trusted-domain

What's the value for the trusted domain? Is that supposed to be http://localhost:3000/ ? I followed the steps Run Login UI, I don't think it states something about Trusted Domains.

hifabienne commented 1 month ago

You are right in the readme thats not stated, only in the ZITADEL docs: https://zitadel.com/docs/guides/integrate/login-ui/typescript-repo#deploy-to-vercel

The domain of the login needs to be added, so it can be used as public host from ZITADEL.