Questions tagged [authentication]

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

Filter by
Sorted by
Tagged with
24
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 ...
23
votes
2answers
41k 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 ...
21
votes
1answer
9k 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: ...
17
votes
3answers
7k 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 ...
14
votes
4answers
3k 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 ...
13
votes
3answers
3k views

Mavensmate: Getting error client identifier invalid while authentication to salesforce

I use Mavensmate, Since morning it is throwing me an error "client identifier invalid" while refreshing or saving any component (Apex Class, Trigger or any) to Salesforce from Sublime. When I try to ...
11
votes
3answers
8k 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?
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
247 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. ...
10
votes
2answers
5k 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 ...
9
votes
2answers
553 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
1answer
858 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
5k 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 ...
8
votes
3answers
4k 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
5k 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
4k 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 ...
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
4k 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 ...
8
votes
2answers
1k 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
2k 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

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 ...
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
447 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
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
351 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
443 views

What is the proper approach for deploying custom Auth. Provider in Salesforce DX?

I have a custom Auth. Provider and a couple of Named Credential which use it. The auth. provider metadata requires "Execute As" field which is represented as username in metadata and as you know, ...
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
1answer
2k 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 ...
6
votes
1answer
818 views

Testing Community "Passwordless Login" using the System.UserManagement Class

I am using the UserManagement class to register and login users with just their Email or Phone Number, which I have managed to get working very nicely... I have now also built a small LWC to allow ...
6
votes
1answer
4k 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
943 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
1k 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
1answer
5k 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 ...
6
votes
3answers
177 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
1k 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 ...
6
votes
1answer
3k 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: ...
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 ...
6
votes
2answers
401 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
2answers
8k views

Accessing Named Credentials' data in apex

Is there a way of accessing the data (exact fields) stored in Spring 15' Named Credentials from apex? For example the username, password and endpoint link fields? And I don't mean for the callout, but ...
5
votes
1answer
554 views

Is there a better way to do two-factor authentication?

I recently got an order from my manager to turn on two-factor authentication on all our databases, so I have enabled "Two-Factor Authentication for User Interface Logins" and assigned the permission ...
5
votes
1answer
571 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
5k 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
2answers
2k views

How to determine if Apex code is executing in an authenticated vs. unauthenticated environment (without a SOQL query)

I am trying to dynamically determine, in an organization-agnostic fashion, whether Apex is executing in an authenticated environment --- whether Customer Portal, Partner Portal, Salesforce Communities,...
5
votes
1answer
6k views

error=redirect_uri_mismatch&error_description=redirect_uri%20must%20match%20configuration

I am connecting two salesforce orgs with connected app, named credential and Auth Provider. I have created connected app in target sandbox. Created Auth Provider in source org by providing Consumer ...
5
votes
1answer
422 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 ...

1
2 3 4 5
10