function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kennedymankennedyman 

Oauth and Cutomer Portal Users

Hello, 

 

I have implemented a simple REST API and oauth java app that connects to my company's salesforce instance. 

 

My code forwards the user here for authorization: 

Redirect URL: https://test.salesforce.com/services/oauth2/authorize?response_type=code&client_id=<client_id>&redirect_uri=https%3A%2F%2Flocalhost%3A8443%2Fsfdcrest%2Fconnect.html&display=touch

 

And this works beautifully, however, there is one major flaw that i cannot figure out.

 

This authentication form does not authenticate customer portal users. Now the portal users I want to hook up to this already have API enabled, and should have access.

 

Does anyone know how to work this so that Customer Portal users are able to authenticate through my oauth REST application?

joshbirkjoshbirk

It's not currently supported - but something we would be looking at supporting at some point down the road (Safe Harbor, etc.). 

 

Possible to go through the SOAP process in the meantime for login?  

 

 

kennedymankennedyman

Hmm, ok. I was hoping to get REST a shot for now. And I was hoping not to have to capture their username/password on my end and have to pass it back and forth.

 

Is there a way to use Apex and build my own custom login page and generate the access token that way?

joshbirkjoshbirk

It's the generating the access token part which is chincy, since without OAuth that could potentially insecure right quick.