1

I'm trying to determine if it's possible to have two different Visualforce login pages so that some external apps use one Visualforce page to authenticate users, while others use a different page. I have a need to add custom branding/messaging for users signing in from a specific external app.

In the OAuth Web Server flow documentation I don't see any parameters that can be added to the Authorize URL that would target a specific page. As far as I can tell the hostname in the authenticate URL is the only aspect of the URL that determines what page a user is sent to for signing in.

I would like to avoid setting up an entirely new community simply to host one login page with custom branding.

1 Answer 1

2

Yes, what you want to do can be done. You want to see the External Identity Documentation. In particular Dynamic Branding Using Custom Login Pages and Extend an Endpoint with the Experience ID. The latter will be the technique you'll need to use to provide the unique branding experience for each external app.

4
  • Do you know if it's possible to use this to present an entirely different Visualforce page for OAuth sign-in? From the documentation it looks like I can use the value of the experienceid as a variable in the original Visualforce page, but I need to completely restructure the page, so I don't think being able to change one variable will be sufficient. Sep 16, 2019 at 20:11
  • I ended up just generating both sets of markup and using that ExperienceID variable to hide/show the appropriate chunk of markup with CSS. Not ideal but I'm not holding my breath that I can have the controller render an entirely different Visualforce page. Thanks for your help. Sep 16, 2019 at 22:19
  • This is covered in a bit more detail in Trailblazer Identity group: one two
    – identigral
    Sep 17, 2019 at 1:53
  • @KevinD I'd also look at Create a Custom Login Page from a Github Project which uses this repository SF Identity login project on GitHub. It should provide a basis for a controller that will allow you to use multiple custom pages.
    – crmprogdev
    Sep 17, 2019 at 14:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .