How to embed ODK login page into iframe?

I am developing a project that use ODK and Enketo to store data and generate form. I want to embed ODK login page into my iframe to login and manage data, because i don't want to redirect my project. But i can't and it show this error in console
Refused to display in a frame because it set 'X-Frame-Options' to 'sameorigin'.
Does anyone have solution for it? It doesn't have to be within the iframe, it can show like a pop up.

What have you done to try to fix the problem? For example, have you tried to change X-Frame-Options to something else?

Yes, i have tried many things. But it don't work. I read about X-Frame-Options and knew that i couldn't change it because it belongs to server.

It'd be really good to understand what you've already tried. Otherwise, we spend a lot of time suggesting things that have already failed.

So there is no way to embed ODK into an iframe, is it?

Did you, for example, try the suggestions at https://stackoverflow.com/questions/6666423/overcoming-display-forbidden-by-x-frame-options?

EDIT: Note that sameorigin is meant to protect users from clickjacking and is generally good policy. Read https://security.stackexchange.com/a/67917 for more.

Thank you all. I had an altinative solution.

1 Like

How can you do this if you are using ODK Cloud, since ODK Cloud controls the server and headers? Is there a way to mark a survey as embeddable?

If you are on ODK Cloud, you can't embed by default because it's not secure. Contact support@getodk.org to discuss options.

We will reach out, thanks. But it seems that if you create an external link, that should allow embedding for that particular link.