To perform the OAuth2 authentication on magnews, you need to create a Connected App on Salesforce.
Log in to your account in magnews and go to the section:
Management > System > Digital Certificates
A list of available digital certificates is displayed.
Click on the Salesforce digital certificate.
Note the information related to the Redirect URI to configure.
The value indicated in this field represents the address of the page that will use the OAuth 2 authentication as the platform's redirect URI.
The next step is the creation of a Connected App in Salesforce.
Using Salesforce in Classic or Lightning mode (default for new accounts), the steps to create it are slightly different.
Creation of Connected App in Classic mode
Log in to Salesforce then click on Setup at the top right of the page.
Scroll down the contextual menu on the left until you find the Create menu item to click on.
Click on the Create item in its submenu and then on the Apps item.
In the displayed page, scroll to the Connected Apps section and click the New button corresponding to this section.
Creation of Connected App in Lightning mode
Log in to Salesforce then click on Setup at the top right of the page.
From the contextual menu on the left, click on Apps and App Manager.
Now click the button at the top right of the page that is shown.
The app creation interface is the same for both the Classic and Lightning versions.
- Connected app name:
enter the valueMagNews
; - API name:
enter the valueMagNews
; - Contact email:
provide a valid email;
Enable the Enable OAuth Settings option:
- Callback URL:
paste the previously noted Redirect_URI.
It is an address that looks like: https://be-mn1.mag-news.it/be/oauth/client - Selected OAuth scopes:
select the following options:
- Access and manage your data (API);
- Perform requests on behalf of the user at any time (refresh_token, offline_access).
Click the Save button at the top and note the Consumer Key which in magnews should be entered in the client_id field and the Consumer Secret which should be entered in the client_secret field.