Creating a logic function that redirects the directus app with set-cookie header

We are trying to pre-login a user. So when they have authenticated with us, we call the auth/login endpoint on their behalf using mode = session. We then extract the set-cookie value and set it on redirect to the directus app. This does seem to work, but it is quite flakey. Is there a more stable way to implement passing an access token to the directus app frontend, so the user is automatically logged in, without needing to enter their credentials on the directus app?

Thanks in advance.

1 Like