Hi there!
I’m building up a web application, where users can log in and register via Facebook. My issue is not with Slim4 itself, but I do not know how overcome the problem with slim4 framework.
By using league/oauth2-facebook package I built a “log in with Facebook” solution, that works perfectly fine. I hit the wall when I desired for “register with Facebook” page.
According to the facebook docs:
A manually specified redirect_uri used with Login on the web must exactly match one of the URIs listed in the app settings
The league oauth package is configured with the following settings:
'client_id' => '...',
'secret_key' => '...',
'callback_url' => ONE_SPECIFIC_URL
'api_version' => '...
As callback url must be a single page, I can set up a generic route like /auth/facebook to authenticate users via Facebook. However, how would I know if the button was clicked on login or registration page? That drives different actions in the application so I need to have that information. I thought about using sessions but it sounds nasty to me (I have a feeling there is a better way).
Are there other capabilities of Slim4 framework I can explore?
Any thoughts are more than welcome.