Home › Forums › Support › Can't seem to get the portal working correctly on self-hosted system This topic contains 4 replies, has 2 voices, and was last updated by jvantslot 11 months ago. Viewing 5 posts - 1 through 5 (of 5 total) Author Posts March 26, 2019 at 12:59 am #20209 jvantslotParticipant I’m in love with Invoice Ninja! Does everything I need. However, I’m having some difficulty getting the portal to work correctly when accessed through an iFrame on my website. I’m sure it’s something I’ve missed, but I can’t seem to figure it out. I can access the portal just fine if I visit my sub-domain like so: https://ninja.example.com/client/login I’m able to log in as a test client with the client contact’s email and password. However, when I try to access the portal from an iFrame on my website: https://www.example.com/portal I get error messages about the credentials not being found. I’m using the following code for my iFrame: <center> iframe code here </center> var iframe = document.getElementById('invoiceIFrame'); var search = window.location.search + '//'; var silent = search.indexOf('silent') > 0; var parts = search.replace('?silent=true', '').split('/'); iframe.src = 'https://ninja.example.com/' + parts + '/' + parts.substring(1, 33) + '/' + parts + (silent ? '?silent=true' : ''); The weird thing is that when I modify the following line: iframe.src = 'https://ninja.example.com/' + parts + '/' + parts.substring(1, 33) + '/' + parts + (silent ? '?silent=true' : ''); To be: iframe.src = 'https://ninja.example.com/client/login'; It works! My question is, Is this the correct way to do this? Am I making my site vulnerable by doing it this way? Any suggestions are welcome. Thanks and keep up the great work! This topic was modified 11 months, 1 week ago by jvantslot. Reason: fixed missing code This topic was modified 11 months, 1 week ago by jvantslot. March 26, 2019 at 5:32 am #20213 Hillel CorenKeymaster I don’t believe the client portal login page is supported when using an iframe. March 26, 2019 at 4:17 pm #20218 jvantslotParticipant Hmm.. that would be strange then, since I’m cutting and pasting the recommended code directly from the portal settings page. Copy the following code to a page on your site. March 26, 2019 at 4:18 pm #20219 Hillel CorenKeymaster The iframe should work with direct invoice links, it just isn’t supported with the client portal login page. March 26, 2019 at 4:25 pm #20221 jvantslotParticipant Ahh. Thanks for the clarification. Seems I’ve misunderstood the function of the portal. Author Posts Viewing 5 posts - 1 through 5 (of 5 total) You must be logged in to reply to this topic.