New answers tagged

0

I realize I'm late to the party here, but I thought I'd post for anyone still struggling with this as I was recently in that category. I learned from SF developer support that AuthSession is not intended to capture logout info per se, so the data can be misleading when a user has logged out. What you need to do is use the LogoutEventStream object to capture ...


0

I tried this, but ExecuteAs(Execution User) still required field, So cant save blank. What i did is, i just deployed RegistrationHandler, Auth.AuthProviderPluginClass, and manually created the AuthProvider record in Production with selecting the Custom AuthProvider name from drop down.


1

As per SFDX Dev Guide you need to set instanceUrl in config and after that you can use access token in place of username. But for this you need to set instanceUrl either globally or in SFDX project (one sfdx project for each different instanceUrl)


2

You might have better luck here using the jsForce library, which is what sfdx uses under the hood, I believe. This page should show you how to create a new connection using jsForce with a session Id and server url


2

Create a new Auth Provider (Setup > Identity > Auth. Providers) for Salesforce, then you can use Named Credentials. Use OAuth, and you won't need to worry about username/passwords, even if the admin changes their username or password; the session will be maintained for you. Only users with Author Apex could possibly write code to even use the Named ...


0

There's no real reason to "validate" the token. If you get a 403 error when using it, the token isn't valid (and the response will tell you why). When you obtain an access token, you can parse the response to check out the scopes. The scope tells you what you're allowed to do. Note that the scope will be the intersection of whatever you request and ...


0

There's a chain of custody you have to follow when retrieving the public key: the iss (Issuer) of the id_token you're trying to verify determines the location of the keys. By default, the issuer will be login.salesforce.com for a production org but (for example) a community hosted in the same org will have a different issuer. If the id_token issued by SF ...


Top 50 recent answers are included