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
SumitkSumitk 

Hpw to authenticate oauth2 for canvas app?

I have a node application deployed on heroku that authenticates with salesforce using oauth2 webflow using connected app. I want to create a tab in salesforce that directly lands to the homepage of node app after authenticating with the logged in salesforce user. Initially I created a web tab but due to content security policy I was unable to load the page. Then I tried creating a canvas app but it also causes mixed content problem as we are redirected to http instead of https during oauth2 webflow. Is there any other way to achieve this?
Sanjay Bhati 95Sanjay Bhati 95
Hi Sumitak,

Please follow this salesforce documentation. Here steps are given to set default home page on login.
https://help.salesforce.com/articleView?id=admin_home_lex_set_default.htm&type=5 (https://help.salesforce.com/articleView?id=admin_home_lex_set_default.htm&type=5)
SumitkSumitk
Hi Sanjay Bhati 95,

The question is not to set default homepage on login but to create a vfpage (or any other stuff) such that I am able to view my nodejs app's homepage ( obviously its already authenticated with salesforce logged in user ). My nodejs app acts as a frontend for salesforce. When user clicks on my login button the user is redirected to salesforce where he login then grants permission to my connected app. After getting permission the user is redirected to my nodejs app's homepage. I want to create a tab in user org so that user can directly access my nodejs app without going through the permission grantting process.