Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM - Deliver protected pages with Salesforce authentication

Avatar

Avatar
Level 1
selvendranr9588
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
selvendranr9588
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
View profile
selvendranr9588
Level 1

28-03-2021

-  Hello team,

 

Please suggest how to implement the below requirement in AEM as a cloud service.

 

1. Few pages in AEM should be protected and should be accessed only after authentication

2. When end users accessing the protected page they should be shown a Salesforce login page

3. Once users logs in successfully with their salesforce account, then the page should be shown.

 

Salesforce have the oAuth setup as mentioned in https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_web_server_flow.htm&type=5

 

I went through some of the docs related to AEM and salesforce integration but not getting the steps on how to achieve it. Any pointers or suggestions will be helpful

 

@AEM @Salesforce @SalesforceAdmin @oauth 

AEM oauth Salesforce

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,356 likes

Total Posts

3,228 posts

Correct Reply

917 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,356 likes

Total Posts

3,228 posts

Correct Reply

917 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

28-03-2021

Hi, To achieve this you need to implement the custom login handler -

1. Creates a Sling Filter which initial salesforce login when the protected page is accessed, the requested page can be stored in cookie to redirect user to the page after login

2. When user is on the salesforce login page, defined a callback url which creates a login/session/or allow the user to the page based on salesforce login cookie/corresponding login cookie.

3. Once session is validated, allow user to access the page. 

You can achieve the same with the front end logic also. 

Answers (0)