
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
passport-sf-signed-post-request
Advanced tools
passport implementation of salesforce signed post request authentication for use in salesforce canvas apps
Provides a strategy implementation for passport for Salesforce's canvas app signed post request authentication mechanism. This strategy is meant to be used with a cookie based user session and a server side session store such as redistogo
To use this authentication strategy you need a salesforce instance. You can sign up for a free edition for development at https://developer.salesforce.com/
Once you have your salesforce instance you can create canvas app by going to Setup > App Manager and clicking the New Connected App
In the canvas app:
You can checkout out an example express app that uses the passport strategy here
https://github.com/atnmorrison/canvasexample1/
The strategy takes the salesforce secret and optionally a callback function to setup the session. The callback function receives the sr (signed request) and the req object so that anything that needs to be done after login can be executed such as setting up session variables for example below the sr is assigned to a session variable for later use
passport.use('sf-signed-post-request', new sfsprStrategy(process.env.CANVAS_SECRET, function(sr, req){
req.session.sr = sr;
}));
Note that for it to run locally you'll need to create a security folder in your forked project with a self signed certificate for SSL. The reason for this is that for canvas to work you need your cookie to use sameSite: "none", and to use that you must use a secure cookie, and to use a secure cookie you must use SSL.
You can follow the excellent instructions to get it up and running in the top answer of this stack overflow
FAQs
passport implementation of salesforce signed post request authentication for use in salesforce canvas apps
The npm package passport-sf-signed-post-request receives a total of 1 weekly downloads. As such, passport-sf-signed-post-request popularity was classified as not popular.
We found that passport-sf-signed-post-request demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.