Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JWT Authentication? #137

Open
EthanGArmstrong opened this issue Feb 12, 2025 · 3 comments
Open

JWT Authentication? #137

EthanGArmstrong opened this issue Feb 12, 2025 · 3 comments
Assignees
Labels
enhancement Feature request question or help Clarification or help may suffice to resolve

Comments

@EthanGArmstrong
Copy link

Hello! Sorry if this is the wrong place to write this, but I'm curious if JWT authentication is possible through sf_auth? It doesn't seem to be an option but maybe I'm missing something! I'd prefer not to store creds anywhere like you have to with OAuth but I'm also not an expert so open to suggestions!

Also, thanks so much for this package - it's a lifesaver!

@StevenMMortimer StevenMMortimer self-assigned this Feb 13, 2025
@StevenMMortimer StevenMMortimer added the question or help Clarification or help may suffice to resolve label Feb 13, 2025
@StevenMMortimer
Copy link
Owner

No, I don't think so. It looks like you can directly obtain an access token using the Salesforce CLI (see here). This looks like the same type of access token that is generated if you authenticate by providing a Username, Password, and Security Token to sf_auth().

@StevenMMortimer
Copy link
Owner

@EthanGArmstrong Heads up that I'm going to close this issue. Feel free to respond and re-open, if needed. Thanks!

@StevenMMortimer
Copy link
Owner

Reopening as a feature enhancement because it looks possible given Python's simple salesforce library supports the functionality.

Simple Salesforce Example:

from simple_salesforce import Salesforce
sf = Salesforce(username='[email protected]', consumer_key='XYZ', privatekey_file='filename.key')

SF Docs:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm#sfdx_dev_auth_jwt_flow

@StevenMMortimer StevenMMortimer added the enhancement Feature request label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request question or help Clarification or help may suffice to resolve
Projects
None yet
Development

No branches or pull requests

2 participants