Stack Exchange Network

Stack Exchange network consists of 175 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 [authentication]

Relating to the mechanisms for user authentication and verification. There are many potential approaches to authentication on the salesforce platform.

22
votes
6answers
4k views

How to roll your own authentication for an external Salesforce App?

Background If you're building an app, that involves Doing some very basic actions on behalf of non-Salesforce users, i.e. creating a Quote Is hosted externally (in other words, not APEX, but rather ...
22
votes
3answers
37k views

How does a user with SAML SSO get redirected to IDP login page?

Question When SSO has been configured for SAML 2.0 and a user's federation identifier has been populated, how do they get redirected to the Identity Provider's login page? Background I'm working to ...
14
votes
4answers
2k views

Why Salesforce.com logs the user in automatically after his/her session has been invalidated?

I'm logging in users via REST in my .NET application. For that in the WebBrowser control constructor I do the following: string server = "https://login.salesforce.com/"; var authURI = new ...
12
votes
1answer
2k views

Use a Named Credential with API key?

I want to be able to make callouts to JotForm, but they do not support OAuth and username/password is insufficient for their API. Here are their docs; for reference, here are the 3 auth options: ...
11
votes
3answers
3k views

When does it make sense to add a Connected App to a Managed Package?

I think I'm familiar with the difference between a connected app definition and its consumption: As the vendor, my Connected App definition lives by himself in a dev org forever: For the users, in ...
11
votes
3answers
1k views

How does lightning authentication work?

I'm new to Salesforce. But I have quite experience with modern SPA frameworks (angular and mean stack). I'm experimenting a bit with Lightning framework (=aura components). How does the ...
10
votes
1answer
244 views

Will I break a TOS by letting contacts login to a visualforce page I create

Will I be breaking any TOS by giving contacts a username (email) and password (generated) to sign into a visualforce page to access an app I build. I want to do this without buying any customer portal ...
10
votes
1answer
2k views

What counts as a login for login-limited licenses (Authenticated Sites / High Volume Customer Portal)?

We're re-building a webservice that previously had it's own authentication and security model baked in. Instead of having the webservice handle this we're looking at switching to using Authenticated ...
10
votes
3answers
3k views

Sites login method using javascript remoting

I'm looking for a way to access the site.login() method using javascript remoting for a mobile/html5 site. The method returns a pageReference in theory, but I'm only getting back a null object. ...
9
votes
2answers
475 views

What user to login to Salesforce with in a connected app that monitors the realtime API

I'm developing a connected app that will be available in the App Exchange. I'm struggling to understand what user my app should connect to Salesforce as. The app has a component that monitors the ...
9
votes
3answers
3k views

Two factor authentication for Community Users

It looks like standard two factor authentication is not available for community users. Does anybody know a work-around for this?
9
votes
1answer
718 views

Using the Mobile SDK JS API, how can I determine if I have a refresh token already?

Background I currently have a hybrid iOS app that runs locally (index.html in the xcode app) that essentially provides a basic start page and login flow instructions that lead off to a force.com web ...
8
votes
3answers
3k views

“Session expired or invalid” problem calling an @RestResource from Apex in Winter '15 preview; UserInfo.getSession returns null for Force.com Sites

Based on threads such as Calling Apex Rest custom web service from Apex code we have HTTP calls in our Apex code (contained in a managed package) back to the same org authorized like this: ...
8
votes
2answers
4k views

Making a Http GET callout to internal Salesforce URL

I have a Salesforce VisualForce page that pretty much just Outputs XML: https://[mynameserver]/Apex/[myxmlpage] I want to expose a WSDL service where I am pretty much just going to wrap the ...
8
votes
5answers
2k views

Visualforce exception page authentication

For sites, there's a standard visualforce exception page. We use a header on the site that will present either Welcome, username Or Login/register ...based on login status. Whenever a user finds ...
8
votes
2answers
2k views

Salesforce call Heroku Web Service

We have a salesforce application, and the application triggers a callout to a heroku service that gathers some data from a third party database. After gathering and processing the data from the third ...
8
votes
2answers
529 views

How to delete SSO information?

I have implemented the auth. provider SSO from Facebook. When I disable a user, I want to delete at the same time the authentication information of Facebook(ex. Third-party account link in User ...
7
votes
4answers
479 views

Can I implement my own authentication process in force.com or it is against terms of service?

I am just wondering if it is permited to implement my own authentication process in force.com or it is against terms of service or any rules. Link to official documentation will be appreciated.
7
votes
3answers
656 views

Sandbox verification emails

Time and time again another user creates or refreshes a sandbox and I cannot log into it. I use my credentials from production, but a verification code is sent to the "myemail=gmail.com@example.com" ...
7
votes
2answers
3k views

Visiting the reset password URL after password has been reset

We have a custom branded community set up, this includes branding all 'native' functions such as password reset as well. We accomplished this by enabling Chatter Answers and customizing the Change ...
7
votes
2answers
2k views

How do I setup access for a REST resource apex class using session ID

We have a REST resource apex class, and its sole purpose is to eliminate the problem of hitting Salesforce page view limits. The way it is currently setup doesn't seem to be eliminating this issue. ...
7
votes
1answer
428 views

OAuth 2.0 handshake for Portal users

As described on OAuth for portal , initial OAuth handshake for authorization code gathering is changed. It should be used different domain URL Like, instead of : https://login.salesforce.com/...
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 ...
7
votes
1answer
1k views

How to authenticate a JavaScript (e.g. AngularJS) client of an Apex @RestResource?

I am working on an AngularJS mobile application that obtains its data from salesforce.com using REST calls to @RestResource Apex classes. (There are no conventional Visualforce/Apex controller pages.) ...
7
votes
2answers
322 views

Inconsistent behavior for login with Customer Portal and Sites

We tried to implement the Customer Portal and Sites together, but we encountered a problem when we deployed to production (works fine in sandbox). This is the behavior we're seeing: Users log in ...
7
votes
0answers
1k views

Is it possible to disable Salesforce Authenticator App completely?

Some time ago I had to enable the MyDomain Feature in order to enable custom lightning components on a Sandbox-Org as described here. Until that the two factor authentication was working with password ...
6
votes
9answers
5k views

Using Timba Surveys: external users see “Authentication Required” page

We are trying to use Timba Surveys to send a feedback survey to our customers. A workflow is triggered when a case is closed and sends an email to external users with the survey link provided by the ...
6
votes
2answers
2k views

REST API server-to-server communication

I'm writing an application that needs to connect and grab some data from Salesforce. Data will be pulled by a background script (no UI) and then populated in a web UI. I can't find anything ...
6
votes
1answer
3k views

Should OAuth2 with grant_type “password” work for “High Volume Customer Portal” users?

I am using the "/services/oauth2/token" end point with grant_type "password" (and with client_id, client_secret, username, password) from JavaScript code. With "IP Restrictions" set to "Relax IP ...
6
votes
1answer
913 views

Long-running sessions for customer portal

For our customers, I'd like to allow them to stay logged in to our customer portal/authenticated site similar to what Amazon does. Goal is to reduce the number of times they have to "do anything" ...
6
votes
1answer
871 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
172 views

Controlling Access to Force.com Site

Is there a way to control who access the force.com site externally besides using IP addresses? I tried using a profile checker: public static String ProfileCheck(){ String ReturnVal; Profile Pro; ...
6
votes
1answer
3k views

Custom Login Page and URL - what was delivered?

This idea https://success.salesforce.com/ideaView?id=08730000000BqQmAAK requesting the ability to be able to define a custom login page (e.g. with you own branding) is marked as "delivered" but with ...
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 ...
5
votes
1answer
1k views

frontdoor.jsp for Customer Portal user? How to authenticate a portal user with session id?

authenticate a customer portal using SOAP login() method and LoginScopeHeader receive SessionID in LoginResult object How can I use SessionID to redirect the user's browser to the customer portal and ...
5
votes
1answer
538 views

Not getting login screen to protect private customer portal page

I have a VF page that is (supposed to be) privileged to authenticated Customer Portal users, but when I clear my browser's cookies and enter the URL for the page, I get immediate access without being ...
5
votes
1answer
3k views

How to connect to Salesforce REST API without OAuth? How does Jitterbit do it?

So what I read everywhere is that, in order to connect to Salesforce via the API, you'll have to authenticate using OAuth. But this involves creating a Connected App, which is 'cumbersome' for normal ...
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
319 views

Attempting to use jQuery to POST to an external server from a Lightning Component

I'm a new dev so feel free to scrutinize everything I post because I need to learn. So I have a component and am utilizing a helper to send some data to one of our company's external sites using ...
5
votes
1answer
1k views

Named Credentials: How to Start OAuth flow?

I'm using Named Credentials with OAuth authentication. When calling a method on the endpoint, my Apex app receives back the status that the token needs to be refreshed. How do I tell Salesforce to ...
5
votes
1answer
3k views

“Unable to resolve request into a Service Provider” return by Salesforce Identity Provider for SAML 2.0 request

I have a Salesforce instance configured to act as an Identity Provider and am trying to connect a (non-Salesforce) Service Provider (client) to it. So we are making a SAML 2.0 samlp:AuthnRequest using ...
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: {"...
5
votes
1answer
580 views

REST API Random Authentication Failure on Sandbox

I've encountered a problem where a sandbox completely stops allowing me to login. Nothing changed in the sandbox configuration. I'm still able to login via the web interface using the exact same ...
5
votes
3answers
852 views

Salesforce Communities - Napili Template

I am setting up a new Napili Community - and I'm trying to figure out how to have both public (guest Users) and Private (authenticated, Self-registered users) working together on the site. I have ...
5
votes
1answer
662 views

Salesforce SSO and SimpleSAMLphp - not redirecting to startURL on logon

I am using SimpleSAMLphp as an Idp and Salesforce as the Sp. I have it working so that I can go to the Salesforce login page and use the additional button to logon using SSO, as per step 1 in this ...
5
votes
1answer
386 views

Using LinkedIn for social login to salesforce

so i have been looking for solutions all over the web to try and find the solution to this simple question: how do i use linkedin as a social login method for any salesforce app/portal/community i ...
5
votes
1answer
2k views

Passing Session Id using URL instead of HTTP headers

When invoking the Tooling API, is there a way to pass the Session Id using just URL parameters? I've seen a couple of Salesforce APIs that work when the Session Id is contained in a URL parameter: ...
5
votes
2answers
302 views

How can I specify an application name when logging in?

I was looking at the login history of my Salesforce API account and I noticed there was a column for application name. I would love to be able to specify that when performing a login so I can ...
5
votes
0answers
114 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 ...
5
votes
0answers
309 views

Named credential does not work with client credentials

I have read the full documentation and have few questions on how named credential works. I have written a custom provider like this: /** * Description of the class * <p /><p /> * @...