#✅ Invite user email with broken link

9 messages · Page 1 of 1 (latest)

real light
#

The invitation email to new users arrives with broken link. The link in the button to accept the invitation arrives without the protocol and without the domain.

I'm using directus on Ubuntu 22.04 server and sendmail configuration.

Anyone having the same problem? does anyone know how to fix it?

sharp wrenBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please help us help you making sure you:

  • Adding an explanation of exactly what you're trying to achieve.
  • Adding any and all related code or previous attempts.
  • Describing the exact issue or error you are facing.
  • Posting any screenshots if applicable.
  • Reading through https://stackoverflow.com/help/how-to-ask.

When you're done with this thread, please close it. Thanks! ✨

(If you have a support agreement and need help, please contact the core team via email.)

polar swift
#

It looks like you have not set de env var PUBLIC_URL, this is what gets added as a prefix to the invitation link. Directus itself from inside has no idea where it is hosted outside in the public world to lead the user back to it in the email.

real light
#

Isn't it enough to configure the "Project URL" field in the Project Settings of the admin?
I'll try in the .env

polar swift
#

The project url is just to put a link on the logo inside the directus studio, kind of a link to the home page, and it is parsed as relative url (inside directus studio) unless you put // or https:// in front of it.

real light
#

Thanks for your help. It worked!

polar swift
#

You are welcome. PUBLIC_URL can actually be set to http://localhost:8055/ for local development and so the link in the email works when opened on the dev machine.

real light
#

Yes, i'm using it on a production server with a subdomain and SSL. Thanks again!

sharp wrenBOT
#

✅ Invite user email with broken link