Jump to content
  • 0
Sign in to follow this  
acslakeland

Passing Authentication Through Iframes

Question

I Have 4 Separate data pages that share 1 authentication. my first problem is i cant get the data page to stay logged in while its in an i frame. unfortunately i have it deployed on a mobile app and the only way that it will work is in an i frame. any other deployment method and i get error UNSAFE REDIRECT

My second Problem is that i have cross app login enabled, which works perfectly with URL or html deployment so i know its properly set up, however i can not get it to work in my i frames. I'm sure the problem is in sending the parameters because I've had to switch to string quarry strings  however i cant find a way to pass the password as a parameter. Any Ideas on how to fix it so the customer doesn't have to log in in each window?

 

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I have tried to deploy 2 pages as iframe and I still stay in both!!! It should be working as long as you stay in the same browser. I even tried on my phone and it is working fine.

If you give me the URL to your page I might be able to figure out the issue

Share this post


Link to post
Share on other sites
  • 0

It is a Mobile App that is downloaded to your phone. i could send you the raw build and you could download to test. just excuse the appearance its far from done. im just trying to work this out first. i would just need an email address or mobile number to send it to.

Share this post


Link to post
Share on other sites
  • 0

<form id="login" target="frame" method="post" action="http://remote.com/login">
<input type="hidden" name="username" value="login" />
<input type="hidden" name="password" value="pass" />
</form>

<iframe id="frame" name="frame"></iframe>

<script type="text/javascript">
// submit the form into iframe for login into remote site
document.getElementById('login').submit();

// once you're logged in, change the source url (if needed)
var iframe = document.getElementById('frame');
iframe.onload = function() {
if (iframe.src != "http://remote.com/list") {
iframe.src = "http://remote.com/list";
}
}
</script>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...