I have a lovely OAuth setup so people can use facebook to register for my force.com site.
It works great for new users, or for existing users where facebook email matches their account.
There's a field on the Auth Provider page called "Single Sign-On Initialization URL" that's used as the link for the registration button and the login button in the salesforce documentaiton.
But if someone clicks the Login button (custom login page) it's linking to the "Single Sign-On Initialization URL" from my Auth Provider.
What I'd like to do is return "no account found...would you like to create one?" What I'm trying to prevent is people trying to sign on with facebook who already have accounts UNDER A DIFFERENT EMAIL on my portal and then it creates a duplicate account for them.
By letting them know the account doesn't exist, they could know they need to login the old way and use that "link" option. Otherwise, they'll be wondering why that have to do new user setup, where all their data is, etc.
Here's the flow
1 Login via facebook/OAuth
2a If it's an existing user, login them in.
2b If it's a new user, direct them to the registration page. There, they can set up an account via facebook OAuth (what the login button is currently doing now). That way, if they know they have an account already, we can help them with linking it.
The only solution we have so far is to have the Registration handler prevent registration. But I only want it to prevent registration from the login page, not from the registration page.