Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jwt]

The tag has no usage guidance.

3
votes
0answers
33 views

Authorize into developer Sandbox using JWT

I am attempting to authorize a developer Sandbox using JWT in an attempt to implement a CI process. I found this related question on the subject: Can I connect to a sandbox using JWT Flow and Prod ...
0
votes
0answers
15 views

Not Listing Scratch Orgs in SDFX CLI

When I create a scratch org I get an error but the org gets created anyway. The error I receive is "ENOENT: no such file or directory" which I don't think is related to DX. There is no way for me to ...
1
vote
0answers
26 views

id_token not returned in JWT Bearer Token OAuth Flow

As per the JWT Bearer token documentation The id_token will be return if there is a pre-existing approval for the openid. I have existing approvals for openid for the user. Am I missing something in ...
0
votes
1answer
18 views

Journey Builder customAcvitity JWT decoded, no organization id

When the custom Activity execute / publish endpoints are called, and the JWT is decoded, there isn't any contextual information for which organization sent the call. This app could be used by many ...
0
votes
1answer
30 views

Salesforce DX connected app

I am trying to build a connected app- connected to our prod environment so that our developers could spin up scratch orgs and work there, however I dont want them to be able to use org:login and ...
1
vote
0answers
41 views

OpenID Single Sign On - Change Authentication Flow

I have an Auth Provider created with OpenID and everything is working good. But, I would like to change the Authentication Flow from web server to user-agent Source: https://help.salesforce.com/...
0
votes
0answers
18 views

key used for keystore is not an RSA key error

I have generated JKS file from EC private key and cert files. When I tried to import the generated .jks file through Certificates and key management -> Import from a Keystore with the alias name ...
1
vote
0answers
39 views

[Talend SF Connection JWT]runtime exception https status 400-bad request message {“error”:“invalid_grant”,“error_description”:“audience is invalid”}

I am facing an error while trying to establish the Oauth connection (JWT) between talend ETL tool and salesforce : runtime exception https status 400-bad request message {"error":"invalid_grant","...
0
votes
1answer
32 views

JWT, Cyrpto.Sign and EncodingUtil.base64Encode

I'm writing my own class to create a JWT. Using the JSONGenerator I am creating the header and payload, base64 encoding these with EncodingUtils. I am then creating a blob from these to sign and use ...
1
vote
0answers
65 views

Salesforce OAuth 2.0 JWT Bearer Token Flow id_token

According to this guide id_token should be in the response if scope parameter contains openid, however the same guide says that scope parameter is not supported. As I've verified no id_token issued ...
1
vote
1answer
262 views

SalesforceDX: Log in to sandbox by username/password from command line without browser involved

Is it possible to log in from sfdx CLI to already existent sandbox having username/password combination? Reading through documentation I see bunch of ways how to authorize - through browser, by ...
2
votes
1answer
237 views

sfdx force:auth:jwt:grant ignoring the instanceurl param

I'm having troubles authenticating to my Dev Hub Org using the JWT token. The command: sfdx force:auth:jwt:grant --clientid *** --username *** --jwtkeyfile *** --setdefaultdevhubusername --...
5
votes
1answer
166 views

Unusual OAuth JWT Bearer Token Flow (Outbound) Integration Pattern

I have a client who's asking me to configure an OAuth JWT Bearer Token integration for them to retrieve delivery status information from a supplier. Salesforce is not the idP. Instead, the flow is ...
1
vote
1answer
197 views

Show user profile image - third party site

I am using Salesforce REST API to pull in the user profile salesforce object into my external site. I wanted to be able to display things like about me, title, and image on my site. I get all of this ...
0
votes
0answers
109 views

How can i write unit test for JWTBearerTokenExchange class

I have create a connected app and authorized in another org and get accessToken for login after that added the username and instance url of another org in custom object and with help of username and ...
0
votes
0answers
90 views

Empty body in request from Entry Event to Custom Activity

First a little backstory. I created a fairly simple journey, this being the first time I've ever touched marketing cloud, let alone journey builder. Here we have a litle chain: A journey with an ...
0
votes
0answers
16 views

Normal to have two connected app in package

We want to do sso onto external system using a connected app. Also we want to do sync of data from external to SF's custom object created via managed app In this scenario we will need two connected ...
2
votes
1answer
144 views

OAuth 2.0 JWT Bearer Token Flow refresh_token

According to this SF StackExchange answer, the OAuth 2.0 JWT Bearer Token flow only need a one-time authorisation of the app certificate, and then you can forever issue a OAuth 2.0 JWT Bearer Token ...
0
votes
0answers
37 views

Still able to authenticate user using JWT token flow with expired self signed certificate in the connected app

I am using JWT token based authentication to Salesforce for my platform user. I have uploaded a self signed certificate as digital signature for my connected app. My certificate has been expired as ...
0
votes
1answer
30 views

Salesforce to Salesforce authentication using JWT

I created a self signed certificate in my dev org A and exported the certificate to keystore. Now I want to use that certificate and import it in Org B to enable JWT authentication. But I get the ...
0
votes
0answers
67 views

Getting response invalid_grant user hasn't approved this consumer when using JWT Bearer Token [duplicate]

I have a Node.js program that attempting to get a token as shown below: 'use strict'; var request = require('request'); var jwt = require('jsonwebtoken'); var key = require('fs').readFileSync('./...
1
vote
1answer
566 views

How to determine the correct 'audience' and 'uri' when using OAuth 2.0 JSON Web Token (JWT) Bearer Token Flow

I have correctly been able to use "OAuth 2.0 Web Server Authentication Flow" and now I'd like to switch to "OAuth 2.0 JWT Bearer Token Flow". I wrote a test application in Node.js with the values two ...
0
votes
1answer
109 views

Salesforce canvas App using OAuth JWT 2.0 Bearer flow

We are trying to build a POC on integrating Salesforce with a third party portal using canvas app. We have to embed this portal into Salesforce when a user logs into Salesforce. We have a local portal ...
1
vote
1answer
129 views

JWT oauth flow “session expired” error

I'm working with a website developer to do some integration with a Salesforce REST API that I've written. We're using JWT oauth flow for the website to authenticate with the Salesforce sandbox. The ...
4
votes
2answers
305 views

Can I connect to a sandbox using JWT Flow and Prod connect app?

I'm trying to connect to a sandbox using the sfdx cli and the JWT flow through force:auth:jwt:grant. According to this Salesforce DX doc, we can use the same connected app information from Production ...
0
votes
0answers
58 views

Salesforce Oauth 2.0 JWT

I am getting below - {"error":"invalid_grant","error_description":"user hasn't approved this consumer"} Dev org To Dev Org, below are the connected app -
4
votes
0answers
566 views

OAuth 2.0 JWT Bearer Token Flow - “user hasn't approved this consumer”

I am trying to get JWT Bearer Token Flow to work. But get the error user hasn't approved this consumer. I have read these posts: Salesforce JWT User Hasn't Approved This Consumer (Again) OAuth 2....
1
vote
2answers
464 views

JWT bearer token flow in web app

I am building a web app, which should allow my app users to fetch their Salesforce data for analysis. For this, I am using OAUTH2.0 web server flow. TO avoid refresh_token related complexities, I am ...
0
votes
1answer
117 views

Connected App: Use external ClientId in JWT

As per this link, The issuer (iss) must be the OAuth client_id **or** the connected app for which the developer registered their certificate. Does this mean can I use external application client id ...
4
votes
1answer
2k views

Authentication using JWT

I am new to use JWT for authenticating external requests. I went through this help article. I am trying to implement above for the following usecase: External application (client) wants to access ...
0
votes
1answer
116 views

DX Scratch Org: Session expired or invalid on using JWT and jsforce

I have been testing FX and scratch orgs with jsforce and I based my first tests with this example. https://jsforce.github.io/blog/posts/20170629-salesforce-dx-with-jsforce.html With the recommendation ...
0
votes
1answer
154 views

frustrated trying to complete trail and getting this error message: Error: Compile Error: Variable does not exist: JWTBearerFlow at line 20 column 31

public class VisionController { // You can upload the `einstein_platform.pem` into your Salesforce org as `File` sObject and read it as below public String getAccessToken() { // Ignore ...
1
vote
1answer
171 views

Identify Marketing cloud account (user) details - Journey builder custom activity

I am working on custom activity where I need to identify the account (user) details from which the request came to the custom activity REST APIs. I thought setting "useJwt": true in the config.json ...
4
votes
2answers
4k views

Salesforce JWT User Hasn't Approved This Consumer (Again)

I know others have asked this question.  The previous solutions have not worked.  Using the OAuth JWT flow.  All Users Can Authorize is selected  User authorized via https://login.salesforce.com/...
1
vote
0answers
145 views

CAN we use JWT with CA signed cert

We have an inbound integration to salesforce where client uses JWT login mechanism. A self signed cert has been provided from salesforce which they use to sign the request. Is there any way we can use ...
1
vote
1answer
585 views

JWT verify signature

I've got a jwt base64 encoded payload and a public certificate. I am able to decode the payload in apex but having hard time validating the signature. Its header has the algorithm RS256. How do I do ...
1
vote
1answer
374 views

Is Digital Signature mandatory for the oauth JWT token flow?

Is Digital Signature mandatory for the oauth JWT token flow ? If not, how do I implement the flow without the certificate.A web server is supposed to send a request for the access token and I need to ...
5
votes
0answers
295 views

How do you use a mock response when calling Auth.JWTBearerTokenExchange.getAccessToken()?

Let's say I have a class like this /** * Example of using JWTBearerTokenExchange to demonstrate issues with testing and mocks */ public class JwtBearerTokenExample { public static String ...
2
votes
0answers
335 views

How do you use Named Credentials with a Google Cloud API, which requires a JWT to get a token?

Is it possible to used named credentials with a service account to connect to the Google Cloud Platform? I'm trying to make a client to send Pub/Sub messages to Google Cloud from Apex, and it'd be ...
0
votes
2answers
798 views

Setting Up JWT oAuth Flow

Can someone provide/point me in the direction of detailed instructions to set up a connected app & JWT token for JWT-Based Authorization Flow? Salesforce documentation isn't super clear. I've ...
4
votes
1answer
427 views

Log in to Community with OAuth Access Token

I am getting an access token using JWT Bearer Token Flow. I'm trying to log in to a Community through "frontdoor.jsp" with the token. Looking at this question, it doesn't look possible. But the ...
0
votes
0answers
54 views

Authenticate user to Salesforce based on pre Desktop authentication

I am using OpenID connect flow to authenticate to Salesforce community using a third party Identity provider service. I have configured all settings in Salesforce and it is working fine when initiated:...
2
votes
1answer
332 views

Using the OAuth JWT flow with guest users in a Lightning Community

We're using the JWT flow to retrieve session IDs for the current user in a Lightning Community, for use in code running outside of Salesforce. In particular, we use that session ID to run SOSL queries ...
6
votes
1answer
816 views

Server to Server JWT Authentication Certificate management

I'm writing an application to sync some data from a service to salesforce and back. I'm working with a developer account and so far I was able to implement the bulk of the needed functionality merely ...
1
vote
0answers
362 views

OAUTH 2.0 JWT How can I access request from client side to send JWT token to client application.

I am very new to the Oauth spec. I have done a lot of research but could not find the answer to what I should do. My task is currently my client application is using Salesforce as OAuth provider. So I ...