Questions tagged [jwt]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

JWT Authentication Flow debug and how to call from Postman (for debugging)

There's an existing Salesforce org with a Community Site. There's an error when user logs in and after which I believe it hands off to Angular for further user experience. In Salesforce logs I see the ...
0
votes
0answers
48 views

Generate JWT for calling out to Snowflake [duplicate]

Trying to create a custom integration from Salesforce to Snowflake and they provide a python snippet, which can be seen here, that is able to generate a jwt to gain authorization. I'm trying to ...
2
votes
1answer
155 views

Named credential JWT is not appearing in Authorization header in callout

I've configured a Named Credential to use the JWT authentication protocol (not JWT Token Exchange), but when the component makes a call to my service using the named credential, I don't get the JWT as ...
2
votes
1answer
37 views

error in node JS and SF integration via jsforce using JWT

Premise: I need to integrate SF with NodeJs using JWT. I'm following Salesforce Developers Session for this purpose. As of now the entire setup of NodeJs is only in local. According to the video I ...
0
votes
1answer
110 views

Send JWT token with External Data Source for Odata v4 endpoint in header

I am trying to Authenticate the Calls to My Odatav4 , In My Service I have started accepting JWT token in header and it is working if i call the service in postman with JWT token in header, Now in my ...
0
votes
3answers
2k views

Add custom claims to OpenID Connect id token - Web Server Authentication flow

We are using Keycloak to generate OpenID Connect id tokens, now they want to use Salesforce Identity to do that. We have some custom claims in the id token returned by Keycloak that we are not able to ...
5
votes
2answers
6k views

JWT Error - user hasn't approved this consumer

I am trying to implement the OAuth 2.0 JWT Bearer Token Flow on my node.js app using these instructions, but I'm unable to authenticate successfully, getting this error: {"error":"invalid_grant","...
21
votes
1answer
18k 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
703 views

How to generate signed JWT token in Apex using JWK keyset

How to generate signed JWT token in Apex using JWK keyset. I know Auth.JWS can be used to generate bearer token. JWS(jwt, certDevName) but it uses certificate to generate token. My requrement is ...
0
votes
1answer
43 views

Username/password JWT with Salesforce Named Credentials

I need to integrate with a service that uses an authentication flow I'm not familiar with and wondering can I use Named Credentials with it? The flow requires that I first get a JWT token by passing a ...
2
votes
2answers
177 views

SF required multi-factor authentications starting February 2022 OAuth JWT Bearer Token flow

I am using JWT flow described bellow https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_jwt_flow.htm&type=5 and SF required multi-factor authentications starting February 2022 ...
3
votes
2answers
1k views

Named Credential with JWT Token Exchange for authorizing calls to Google Cloud

I can make requests with Bearer from Auth.JWT: Auth.JWT jwt = new Auth.JWT(); jwt.setSub('service-portal-rlj@appspot.gserviceaccount.com'); jwt.setAud('https://accounts.google.com/o/oauth2/token'); ...
5
votes
1answer
292 views

How to verify an Auth0 JWT in a Marketing Cloud Page

We have a requirement to do a verification of a JWT in a SFMC Cloud Page, as we have a site with Client Side JavaScript calling the cloud page and there is no security in SFMC for Cloud Pages. I've ...
3
votes
1answer
1k 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 ...
1
vote
1answer
71 views

Access token doesn't change with JWT flow

I have a connected app to use the JWT flow and I generate the access token with sfdx force:auth:jwt:grant command. I noticed that the obtained token is always the same even after a day. I would expect ...
1
vote
1answer
1k views

Named credential: How do I set up JWT

This is my first time setting up Named credentials with JWT, and I am a little bit confused. Currently to test the external api I am using postman: Method:Post: https://api.xxx.com.au/login { "...
1
vote
1answer
2k views

Generate JWToken from salesforce using Consumer Secret

I am trying to connect to an API and based on their requirement, JWToken is required to make a call and the JWToken must be signed using the provided consumer secret. Now, they have a sample code in ...
0
votes
1answer
1k views

Intermittent JWT Authentication Failure

I just spun up a new sandbox (couple of hours old) and I am trying to setup a CI/CD process using BitBucket Pipelines and sfdx. When I run the force:auth:jwt:grant command with hardcoded values (i.e. ...
0
votes
0answers
53 views

invalid_grant invalid assertion POST /services/oauth2/token

I followed up this guide and I believe I did it correctly. However I'm receiving this error from POSTMAN POST /services/oauth2/token HTTP/1.1 User-Agent: PostmanRuntime/7.28.4 Accept: */* Postman-...
1
vote
1answer
453 views

JWT Authentication in salesforce

I am trying to log in another user in my same org using below code. String username = 'test1@salesforce.com'; String jwtVal = '*****'; String tokenEndPoint = System.URL.getSalesforceBaseURL()....
1
vote
2answers
3k views

Authorization via JWT yields an "invalid assertion" error

I failed to request an access token. Following doc to authentification using JWT, I already have my connected app, my JWT Key so I just need to make a POST requestion to : https://test.salesforce.com/...
19
votes
6answers
26k 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/...
2
votes
0answers
118 views

Does APEX language support ES256 algorithm?

I'm trying to implement social login via Apple. When requesting an access token, I get an "invalid_client" error. I found that one cause for this issue is a bad-formatted JWT, which is ...
-2
votes
1answer
76 views

Salesforce to an external Service callout using JWT [closed]

Hi Community Members, The ask is to call a service, from Salesforce that will accept only requests that are based on JWT. Precise wording is Salesforce sends an encrypted JWT object containing the ...
-2
votes
1answer
134 views

Redirecting to an external page using JWT

I am required to redirect a user to an external payment gateway, from a visualforce page. Apart from just the redirection, sensitive information is to be passed to the external gateways, and using JWT....
0
votes
1answer
77 views

Salesforce oAuth JWT Integration

We have provided salesforce self signed certificate to external system for oAuth JWT integration with salesforce. when they hit salesforce they get the below error What does this error mean and how to ...
0
votes
1answer
185 views

{"error":"invalid_grant","error_description":"invalid assertion"} I want to send post request to Salesforce [closed]

I am trying to send post request to salesforce for Oauth by using JWT and I wrote it like the one below, but I got an error that says {"error":"invalid_grant","...
1
vote
0answers
58 views

JWT authentication parameter error

I am currently working on the project that I am going to integrate the application of my company and salesforce. In my case, it seemed that using the JWT for authentication is better. So, I wanted to ...
1
vote
2answers
851 views

Ruby - OAuth 2.0 JWT Bearer Token Flow

I am following this document as I try to implement the Salesforce OAuth 2.0 JWT Bearer Token Flow. There are a number of steps involved and I have tried them over and over again but I keep getting {"...
1
vote
1answer
102 views

Using JWT As authentication Protocol in Named Credentials for External Service

As a part of my project work, I need to connect to Azure Logic App via External Service in Salesforce. I know the prerequisite is to create Named Credentials first. I have chosen following in setting ...
4
votes
1answer
929 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 ...
2
votes
2answers
151 views

SessionID access vulnerability found when using Metadata API

Salesforce is performing manual security review in our package. They have found SessionID access Vulnerability in one of our file where we are using Metadata API to grant permissions on profile and ...
2
votes
1answer
2k views

How to know what certificate is associated with a connected app?

I have a connected app and I would like to know what certificate it is associated with. How does one find out that information?
0
votes
0answers
43 views

Community SSO using JWT

We are setting up a Salesforce Community and our community members should be able to automatically login from 3rd party and at their end they will create the JWT payload and via connected app ...
1
vote
1answer
82 views

OAuth2.0 JWT bearer token flow with alg HS256 issue

I have written the below python code for JWT integration: from datetime import datetime import jwt import time import requests # *** Update these values to match your configuration *** IS_SANDBOX = ...
0
votes
0answers
67 views

How to access JWT in registration handler using Auth provider (open id)

In our org we have an open Id auth provider setup that works fine along with the registration handler. The only issue is we are receiving only the email currently from the provider in the auth....
2
votes
1answer
86 views

OAuth JWT Bearer Flow and Managed Packages

Does anyone know if the Certificate uploaded to a Connected App in my Dev org will be installed automatically to all customers through a Managed Package? Right now I have a small analytics app that I ...
0
votes
1answer
421 views

Salesforce SSL Cert imported into java trust store for integration works on the day imported but gives certificate error the next day

I am importing the Salesforce SSL certs for the test.salesforce.com and our sandbox environment using the commands below in a VM server environment. Import test.salesforce.com or login.salesforce.com ...
2
votes
2answers
1k views

Generate a JWT with HS256 signature

I am trying to generate an HS256 signed JWT token via Apex. I am using this token in the Authy registration process to enable 2FA for community users. Per the Authy documentation HS256 is the only ...
2
votes
1answer
1k views

Error authenticating with JWT config due to: audience is invalid

I've created a connected app based on this Trailhead project. Note that this isn't about a trailhead project I'm using what I've learned from Trailhead in a real-world project to implement CI/CD for ...
1
vote
0answers
33 views

Pass JWT Token (ID Token) when calling external System using Salesforce Connect

We are working on a Integration to get data from an external system using Salesforce Connect. The high level flow is Salesforce (Connect) -> APIGEE -> Legacy System For Authentication - We are ...
0
votes
1answer
106 views

Automatically Login via SSO Connected App

I'm trying to teach myself IAM areas I'm weak on. I have 2 dev ed orgs.Org A - is the IDP Org B - is the SP I have created the SSO settings in Org B to use Org A as the IDP.In Org A, I have created ...
4
votes
0answers
116 views

JWT Token Exchange setup in Named Credentials for outbound callout

Trying to integrate with okta api from Salesforce that supports JWT Token exchange. I was able to successfully get the access token with the below code but I am blocked on how to use named credentials ...
4
votes
1answer
2k views

How do I install and preauthorize app so I can use the JWT Bearer token flow?

I'm trying to follow the instructions in https://help.salesforce.com/articleView?id=remoteaccess_oauth_jwt_flow.htm&type=5 and get an invalid request with an error description of "refresh_token ...
1
vote
1answer
836 views

Crypto.verify(..) - format of a public key

I'm actually using an apex implementation of jwt for the rsa256 cryptography type using this class from github : https://github.com/salesforceidentity/jwt. I have been able to generate a signature ...
0
votes
0answers
102 views

Access REST API with Connected-App and JWT Bearer Token Flow

I read this article and created php demo script. https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_jwt_flow.htm&type=5 Environment: Sandbox OAuth Scopes: api, refresh_token, ...
4
votes
2answers
435 views

Cannot authorize a Scratch Org via JWT - invalid_grant - user hasn't approved this consumer

I've followed the docs here to create a cert and configured the following; OAuth scopes: api, refresh_token, offline_access and web Permitted users: Admin approved users are pre-authorized Profiles: ...
5
votes
2answers
7k views

This org appears to have a problem with its OAuth configuration. Reason: invalid_grant - audience is invalid

Error while trying to authorize an org through JWT from SFDX CLI on Windows. sfdx force:auth:jwt:grant --clientid <myclientid> --jwtkeyfile server.key --instanceurl https://mysandbox.my....
0
votes
0answers
162 views

Using Named Credentials with an endpoint running on my machine

I am trying to generate a JSON Web Token(JWT) via named credentials as per user. I want to use this named creds for authentication purpose. So that using them after salesforce providing JSON web token,...
2
votes
1answer
2k views

Decode JWT Token in Apex [closed]

I am trying decode JWT token in apex, and i am not sure how that can be done. If anyone has done that before, please let me know the process. A JWT token is sent to SFDC and need to decode it in apex ...