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
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 ...
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 ...
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-...
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
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 ...
-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
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 ...
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 ...
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 = ...
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 ...
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 ...
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, ...
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,...
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
123 views

Generate a JWT with Apex to call a web service from another system [duplicate]

I develop an Apex class wich calls an web service from another system. I need to use a JWT to make the authentication but I never used it, so I don't know how to do it. I read the Salesforce ...
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
645 views

Allow external users to access customer community SSO/JWT

Use Case: Coming from the client website, the external users need to be log into their customer communities account without having to log again. I know that I could use SAML for this use case, but ...
1
vote
1answer
191 views

Generate JWT token for external app - SSO

We are setting up a Salesforce Community and our community members should be able to automatically login using the credentials from an extenal platform when clicking on a link from this platform. I'm ...
0
votes
0answers
252 views

Can Marketing Cloud generate JWT tokens in AMPScript?

As the title suggests, I need to make a callout to an external service but must sign the request with a JWT token (using a private key). Is this possible?
1
vote
1answer
126 views

OAuth 2.0 JWT Bearer Flow - XMLHttpRequest CORS and SameSite error and Gack

We are implamenting a chatbot using the OAuth 2.0 JWT Bearer Token Flow and see the above errors in the browser client degugger. We already have a valid access token and the origin has already been ...
0
votes
0answers
103 views

Ant validation/deployment errors using sessionId

I have a weird problem with Ant setup on CI. I have a script that fetches access token using JWT. The token is retrieved successfully, and when I want to use it with Ant deployment (switching in ant ...
7
votes
0answers
478 views

sfdx force:auth:jwt:grant failure user hasn't approved this consumer - cross machine

This is related to How to open a scratch org created in another machine but posed somewhat differently Given: DevHub with Connected App defined using a digital certificate Correct Oauth scopes ...
1
vote
0answers
98 views

Is there a way to convert JWK to x.509 cert in Apex salesforce

Is there any way in APEX Salesforce to convert JWK to x.509 cert so that the Crypto class can be used to verify another JWT ?
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'); ...
1
vote
0answers
321 views

Cannot connect to sandbox using JWT

I connected to Production Org with JWT through connected app without any difficulty. However, by applying the same procedure, I could not connect to Sandbox using JWT. Here is my command: sfdx force:...
0
votes
0answers
52 views

ID Token from OpenId Connect

We are using OpenId Connect for SSO into a Community with an external Identity Provider. It is easy to get the Access Token returned via AuthToken.getAccessToken. Is there any way get the ID Token (...
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/...
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 ...
0
votes
0answers
69 views

Cannot login to the sandbox app using JWT: invalid_grant: user hasn't approved this consumer (400)

so I generated and uploaded self-signed certificate, created an app, selected "Admin approved users are pre-authorized", added username role to approved list and wrote following code (using Ruby and ...
0
votes
1answer
91 views

JWT connectiong failing with Connected App in a Different Org

We have two SF orgs SF1 and SF2. In SF1, we create a connected app, uploaded a digital certificate, and have policy of 'Admin Authorized user'. We added the needed profile. The client is able to ...
0
votes
1answer
117 views

Lightning Out --- How to go around session persistence

We currently have an LWC component. It is targeted to be used in 3rd party sites. The best way to do this is via Lightning Out. We therefore created a lightning out application, it is currently ...
3
votes
0answers
57 views

Marketing Cloud Installed Package JWT

We have a package ready to be published on app exchange and wondering if the JWT secret of the package will change for the users installing our package. The JWT is hard coded in our Package.json and ...
1
vote
1answer
342 views

Issue getting public key, getting 400 Bad Request using JWT+OAuth while integrating salesforce with Box.com [closed]

I am trying to get access token from box.com. For this I created a custom app that uses OAuth and JWT. I have also created a self signed certificate in salesforce. This self signed certificate is used ...
2
votes
0answers
361 views

Salesforce Named Credentials JWT token exchange (outbound) [duplicate]

For server to server integration between two salesforce org. I have used JWT exchange token authentication. I found a difference between JWT created via Apex Auth.JWTBearerTokenExchange and Named ...
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: ...
0
votes
0answers
61 views

Apex callout failed with SunCertPathBuilderException [duplicate]

Below is the requirement and they provided JAva code to create JWT. JWT token should be signed with Client Secret. Client Key, UniqueAppId (Id assigned to the app) and a GUID should be included in ...
2
votes
1answer
3k views

Salesforce connecting to a JWT service via Named Credentials - JWT Token Exchange

Use Case I would like to prepare a demo for a client where we can from Salesforce access a third-party API. The authentication protocol for the external third-party API is SF will issue a JWT and ...