Salesforce Additional URLs
Opened this issue · 6 comments
jawills commented
For the Salesforce provider, the token and authorize endpoints are hardcoded:
const authorizeEndpoint = "https://login.salesforce.com/services/oauth2/authorize";
const tokenEndpoint = "https://login.salesforce.com/services/oauth2/token";
There is a use case to pass in a dynamic base url, so a feature like providing a custom url, or toggle for the sandbox url is ideal. Ex:
var baseUrl = "https://login.salesforce.com";
if(isSandbox){
baseUrl = "https://test.salesforce.com";
}
const authorizeEndpoint = baseUrl + "/services/oauth2/authorize";
const tokenEndpoint = baseUrl + "/services/oauth2/token";
Custom domains can also be passed, so it may be best to have an optional parameter in the OAuth2ProviderWithPKCE
interface / contstuctor
pilcrowonpaper commented
We can add this in v2 - can you configure the path as well? i.e. are you limited to /services/oauth2/token or can you do something like /something-else/services/oauth2/token?
jawills commented
pilcrowonpaper commented
Thanks, will add this in v2!
pilcrowonpaper commented
Added in v2 beta
jawills commented
I can test this. Is there an easy way of updating & integrating w/ lucia to test?
pilcrowonpaper commented
Here's the v2 docs