Questions tagged [oauth]

OAuth is an open, standard, protocol to allow users to securely authorize web, mobile and desktop applications to access web services on their behalf. Salesforce supports OAuth 1.0a and 2.0.

0
votes
1answer
930 views

Oauth Implementation [closed]

I need Oauth Implementation without User Credentials... using Connected App..Can Anyone Please help me out of this issue. I have created the following class but it is showing redirect uri mismatch ...
56
votes
2answers
20k views

What causes a Connected App's Refresh Token to expire?

We have configured our web application to use OAuth2 with our SFDC Connected App. The connected app is configured to never expire the refresh token unless manually revoked. When an admin connects the ...
4
votes
3answers
38k views

Missing SOAP action header

Im trying to get the session ID of another user in the same org by sending the following request by using the data from my enterprise wsdl and its an developer edition. <?xml version="1.0" ...
3
votes
1answer
1k views

Username-Password OAuth Authentication for community users?

I have a native ios app and i want to login using the username password flow, From the POC i made i discovered that for community user, i dont get a security token which i was using while REST call to ...
9
votes
1answer
843 views

How is it that some OAuth-authenticated apps don't require an Org to create a Connect App in order to be installed?

As far as I can tell from the documentation you are required to created a Connected App (ex-Remote App) in order to use salesforce as the authentication authority. However there are apps that don't ...
8
votes
1answer
9k views

Why do I get 'PKIX path building failed' exception with my callout?

Error message :PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Hello all please see the above ...
5
votes
2answers
3k views

Pros and cons of user-agent flow vs web server flow

After looking into the different OAuth types and reading this question, I'm still confused on the specific pros and cons of user-agent vs web server flows. The best explanation I can find says that ...
1
vote
2answers
3k views

Call Apex REST service from JS on same org VF page - how to get instanceUrl and authToken?

I have an Apex class implementing a simple REST GET method @RestResource(urlMapping='/myrest/*') global class MyResService { @HttpGet global static CustomObject__c doGet() { .. } } ...
18
votes
3answers
13k views

Salesforce: Any API for getting user information?

I am trying to find a way to get the information about the salesforce enterprise user from his auth_token. I want to find the username, email address and role(admin/user) from the auth-token. ...
7
votes
2answers
2k views

Using OAuth 1.0 encoded requests for external webservice calls

I have a business requirement that necessitates a callout from Apex to an external .NET based web service that receives signed OAuth responses. There is no built-in support for this in Apex, but ...
8
votes
1answer
5k views

Error using Session Id auth with cURL following REST documentation

Problem: trying to authenticate to a dev org using Session Id authentication and cURL fails when following the REST API Dev doc. The example in the doc provides the following, which fails (Quick Start ...
7
votes
1answer
2k views

OAuth 2.0 JWT Bearer Token Flow giving a user hasn't approved this consumer error

I have setup a connected app and want to use the OAuth JWT. Based on my understanding of the salesforce documentation only preauthorized client can use this flow to get an access token. I have ...
6
votes
1answer
876 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 ...
6
votes
3answers
3k views

Remote Access Apps (Production & Sandbox support)

A Remote Access record has a Client ID (key), Consumer Secret and Callback URL. To my knowledge, the proper callback URL for Salesforce is https://login.salesforce.com/services/oauth2/success. ...
7
votes
1answer
801 views

OAuth - URL No Longer Exists

I am an ISV partner of SalesForce.com, I use OAuth between my Google App Engine service and my service on Force.com platform to transfer data. For some reason the handshake of OAuth needs to be ...
5
votes
1answer
2k views

Bypassing RemoteAccessAuthorizationPage when using a remote application?

Hey guys I had a dream last night about a huge issue in our ability to aggregate data. After setting up a remote app, using PHP to "CURL" into login.salesforce.com for authorization, we hit the ...
5
votes
1answer
1k views

Canvas App started sending GET instead of POST

I have a canvas app that is setup to use the signed request (POST) access method, and when I test the app via either the tab that it creates or the canvas app previewer it sends my webserver a POST ...
5
votes
1answer
2k views

OAuth 2.0 JWT Bearer Token Flow

I'm trying to perform the OAuth 2.0 JWT Bearer Token Flow: https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_oauth_jwt_flow.htm&language=en_US But I'm having this issue: {"...
3
votes
1answer
140 views

What is the value of using an OAuth flow for your own external systems

I'd like to begin by saying that I'm not talking about systems outside of a given company. I understand how OAuth is important for an application like workbench, where you don't know who the people ...
0
votes
1answer
1k views

Unable to retrieve context in canvas app when authenticating with oauth

I’m having trouble authenticating my canvas app using oauth2. This is despite being able to authenticate and connect via other means. The following is my problem in detail… I’ve configured a ...
8
votes
1answer
25k views

What is the use of setting OAuth Callback URL as https://login.salesforce.com/services/oauth2/success?

I'm using Salesforce developer account and trying to obtain OAuth access token using curl and it returns 500 Server Error giving the message specified in [1]. Used curl command is curl -v -H "Content-...
6
votes
3answers
11k views

Server-Side REST Authentication

We are trying to interface with our SalesForce instance via HTTP. The idea would be to call some of our custom classes from outside salesforce but without any user interaction. Typical scenario is ...
5
votes
1answer
135 views

Storing OAuth Credentials

I have the following issue and need an advice on how to approach it. I connect to a third party system which generates a JWT token. The problem is that the token expires every 15 minutes and I'am not ...
4
votes
2answers
2k views

Making rest request with Oauth

I have all four Oauth token consumerKey, consumerSecret, accessKey and accessSecret. I need to make a request to a url from my apex code. Is there any library or a way to make this request. In java I ...
4
votes
1answer
792 views

Can i query the Remote access object to get consumer key and consumer secret?

We created an appexchange application that runs on Heroku. This application can run without the user loging-in each time. For this we use the Remote access app with consumer key and consumer secret. ...
4
votes
1answer
373 views

possible to access REST API of another SF instance with portal user from scheduled class?

I have a scenario where I'd like a user of another SF instance to register in our portal, then have a scheduled class on their end reach out to a REST endpoint on our end. Upon reviewing the oAuth ...
3
votes
1answer
694 views

How to limit an access to specific REST endpoint?

Let's assume I have an REST ednpoint created: @RestResource(urlMapping='/CUSTOM_DATA/*') global with sharing class MY_CUSTOM_DATA Now I am going to create Connected App with Full Access scope, I ...
2
votes
1answer
1k views

how to access a connected app from another org

I have created one connected app with API (Enable OAuth Settings) and it has generated consumer key and consumer secret. how to use this information to access the connected app from a different org? ...
2
votes
1answer
782 views

Using Facebook as an IdP with Salesforce in oAuth

I am getting an access_token from Facebook in my JavaScript. My logged in user has a HVCP profile (nowadays, a communities user). I would now like to make REST API calls to my Salesforce instance with ...
2
votes
2answers
537 views

JWT Oauth flow Confusion

I am having trouble getting the hang of the JWT Oauth flow and how it exactly works. Is a user supposed to enter their username on your website, which you then generate the JWT on your server and then ...
0
votes
0answers
161 views

Embed Visualforce Page into Native Mobile app as Hybrid page

We have developed a native iOS mobile app that connects to Salesforce, users login through this native app using OAuth user-agent flow and a connected App. This all works fine. We are now trying to ...
0
votes
0answers
98 views

When would a Client Application be unable to use the User-Agent OAuth Flow (but able to use Web Server OAuth Flow)?

A Client Secret is no longer required for Web Server OAuth Flow. This is not a new feature (Spring'17), but I have not given it much thought until now. "If a client application can’t securely store ...