Login to Splynx from provider site

For example, you have own web-site and Splynx-system. All customers enter to portal using link like - http://XXX.XXX.XXX.XXX/portal/login :

And now, you want customers enter the portal through your web-site. To resolve this issue, we can use “iframe”-tag in HTML-code of web-site. Just select some container and paste there “iframe”:

<div>
<iframe src="http://192.168.77.249/portal/login?iframe" width="600" height="230" align="left">
</iframe>
</div>

where:

  • <div>-tag - some container;
  • “src” in <iframe>-tag is link to your customer-portal;
  • and of course css-styles (width=“600” height=“230” align=“left”) should be in css-file.

Let see in code:

And now, customers can be authorised right from your web-site and will be redirected to their own home-page:

That is all.

WBR, Splynx team.

4 Likes

Is there any way to change the layout of the iframe page? I would like to change the Customer Login text and replace the button with our custom buttons to match our website.

@spous yes you can do that by going to the following directory and editing the iframe.twig file

/var/www/html/splynx/views/portal/login/iframe.twig

I have portal.domain.com as Splynx domain. I have the login as an iFrame on our website at www.domain.com/my-account.

I want to put a 301 redirect on / at portal.domain.com to go to https://www.domain.com/my-account instead of redirecting to portal.domain.com/portal/login so customers who go to the portal address they have book marked are sent to our branded login on our website for marketing purposes.

How can I do this in the Splynx server.

Since we added the security policy, now it requires adding your domain (Provider’s domain) as the trusted domain in the Config → Main → API:

and only then you should be able to see the iframe.

1 Like

If you’re trying to embed the Splynx login in your own website (for branding, seamless customer UX, etc.), here’s what you need to know:

1. Twig/Template Customizations Are Dead

If you’ve used Splynx for a while, you might remember being able to override portal Twig templates directly (e.g. login.twig).
That’s no longer possible in recent Splynx versions!
The login page is now locked down; direct Twig or template overrides won’t work. (I spent hours on this—don’t bother.)


2. The Only Real Solution: Use the Add-On Module System

I opened a support ticket, and Splynx support confirmed:

“The best option for changing the customer portal is through the add-on entry points. You can create a new add-on on your Splynx instance and set the appropriate entry points with the corresponding style customization.”

Steps:

  1. Go to Integrations → Install module
  2. Fill in Main Info:
  • Module name, title, type (Add-on)
  1. Add an Entry Point:
  • Place: Customer portal
  • Type: Code
  1. Set Point:
  • Root: Login (or the page you want)
  • Placement: Before content (or as needed)
  1. Add your CSS/JS:
  • Insert your <style>...</style> or <script>...</script> in the code box
  • Example: Hide parts of the default login, override styles, etc.
  1. Click Install

3. Embedding in Your Website: Use an iFrame

  • Since direct template overrides are impossible, the only way to embed the login in your external website is via an <iframe> pointing to the login page.
  • The catch? The default Splynx portal layout is NOT made for embedding—so you must:
    • Use your module add-on to hide everything except the form
    • Override padding, backgrounds, etc. with CSS injected from the module
    • Style the login fields to match your branding

To embed the cleaned-up login page in your site:


`<iframe
  src="https://admin.yourisp.com/portal/login?iframe"
  width="100%"
  height="200"
  style={{
    border: "none",
    borderRadius: 0,
    display: "block",
    margin: 0,
    padding: 0,
    overflow: "hidden",
    background: "transparent",
    width: "100%",
  }}
  scrolling="no"
  title="Customer Login"
/>
`

4. Challenges & Solutions

a) Hiding Unwanted Portal Content

  • Use your entry-point module’s <style> block to hide logos, footers, backgrounds, and right-side shapes.
  • Use display: none !important; on all unnecessary elements.

b) iFrame Sizing & Responsiveness

  • On your own website, make your iframe width 100%, no border/padding.
  • On mobile, use CSS transforms to visually scale down the login form so it doesn’t get cut off.
  • Tweak both iframe and card container styles for perfect pixel matching.

c) Maintenance

  • Whenever Splynx updates their portal, double-check your add-on still works! Some class names or element structures may change.

5. Final Tips

  • Do not attempt to override templates or upload custom Twig files—they will not load.
  • All real customization is done through the module entry-point system as described above.
  • For mobile-friendliness: Use external CSS on your site to visually scale the iframe contents for smaller screens.

Summary:

Twig overrides are dead. Use the add-on entry point system to inject custom CSS/JS, hide everything but the form, and use an iFrame to embed in your site.

1 Like

We were worried about people who had booked marked the portal login page after moving the login to our website, so we wanted the login visible inside our embedded iFrame (using the ?iframe query string). After some trial and error and support guidance, here’s the simple solution:

Add this script to your custom module or header:

<script>
  // Redirect users who do NOT have ?iframe in the URL
  (function() {
    if (window.location.search.indexOf('iframe') === -1) {
      window.location.href = 'https://www.myisp.com/login'; // Change this to your desired landing page
    }
  })();
</script>

What it does:

If the page is loaded without ?iframe, the user is immediately redirected to your chosen landing page.

If loaded with ?iframe, (i.e., inside your website’s embed) nothing happens—the login works as expected.

This keeps your customer portal login clean and only visible where you want it.

1 Like

Why did you need the Add-on system instead of just using the “Site customization” stuff?
(splynxurl/admin/config/main/customization)

There’s a “Customer portal” section where you can give it custom CSS and custom JavaScript to override things… Although I suppose if your customizations are complicated enough then maybe the add-on is required?

1 Like

The “site customization” applies to the entire portal and not just the login page. By creating a custom module we were able to modify the code on just the login page itself and not the entire customer portal.

Hiding everything but the login fields and button on the customer portal wouldn’t work so well lol.

3 Likes

Correct, the entry points are the more accurate solution. There, you can specify a certain place for your changes:

P.S. regarding the twig - it’s not dead yet, but developers are planning to remove it completely as they step-by-step replace it with Vue.js
So, it’s better to avoid of using it.

So what does that mean for invoice templates? If we build them on twig, are they going to have to be recoded as well? Or is twig just being depreciated for pages.

no-no, templates won’t change. It’s only about the system’s interface (for pages like you said).

2 Likes

In step 5, what code is added?

We are also trying to add the iframe to our website but we don’t want to disable “Trust all domains” in order to start adding them manually. We use a few API sources such as One Touch Switching etc. So custom module is looking like our solution, just need to understand the process.

Hello Chris,

the code is still the same:

unfortunately, it won’t work if you don’t disable “Trust all domains”

Thank you

so to confirm, The trus all domains must be disabled and manually declared per URL, then the install-module process and where the point config code requires adding, the div and it’s embedded ifram code added, then module installed and ifram code also added to website?

Or is it simply a case of disable all domains, add those using API, then add the iframe to the website HTML with no “install-module” required?

UPDATE: i got the embedded login page to load, but I could use some clarity on exactly what the code portion of the install module add on should be?

I don’t fully understand what the custom module code snippet is doing, does it override the default presentation of the login screen?

I added:

<iframe src="https://OURSSPLYNXURL.com/portal/login?iframe" width="100%" height="200" style={{ border: "none", borderRadius: 0, display: "block", margin: 0, padding: 0, overflow: "hidden", background: "transparent", width: "100%", }} scrolling="no" title="Customer Login" />

but no change in presentation.

Hello,

unfortunately, you did it in the wrong way.

You should add to your site, only the code from my screenshot above.

All customization must be done like @Spencer_Pous did in his post here - Login to Splynx from provider site - #6 by Spencer_Pous

If you don’t understand how to achieve it, please create a ticket and our engineer will help you with the solution.

Thank you