function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
basha skbasha sk 

External website login through IFrames?

Hi All,

I'm trying to login third party external website from Salesforce IFrames.

For that I have developed a page with two buttons

> Button 1: Accesstoken

> Button 2 : Login

By clicking the "button 1" it generates a access token in browser like below response :

        <status code="ok"/>
After that I click the "button 2" Then only it taken login to external website through iframe.

Problem: How can I login external website instead of generating access token visually?.

VF Page :


    <apex:page standardController="Test__c" extensions="CreateAdobeWebinar">
        <apex:form >        
                 <apex:commandButton value="Accesstoken" action="{!processButtonClick}"/>  
                 <apex:commandButton value="Login" action="{!doLogin}"/>            

Apex Class :

    public class CreateAdobeWebinar {
        Public String password;
        Public String url;
        Public String accesstoken;
        public PageReference pageref2{get;set;}
        public Test__c login;
            public CreateAdobeWebinar(ApexPages.StandardSetController controller){       
                this.login= (Test__c)controller.getRecord();             
            public CreateAdobeWebinar(ApexPages.StandardController controller){}   
            public PageReference processButtonClick(){
                PageReference pageref = new PageReference('https://xxxxxxxxxx/api/xml?action=login&'+cookie);
                  //PageReference pageref2 = new PageReference('/apex/AdobeIframe');
                 return pageref;                          
            public PageReference doLogin(){
              PageReference pageref2 = new PageReference('/apex/AdobeIframe');
              return pageref2;

AdobeIframe Page:

    <apex:page standardController="Test__c">
        <apex:iframe height="800" width="1230" src="" scrolling="true"/>

Venu KoduruVenu Koduru
Hi Basha, were you able to achieve this?