-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring code for simplification and interoperability #8
base: master
Are you sure you want to change the base?
Conversation
The login needs to happen on form submit to be compatible with the simple_fb_connect module and other modules that use "code" in a request. Account kit does not really provide an authentication mechanism other than the form with the javascript anyway.
Hi @bircher, Thanks for the PR, I'll just test tomorrow and merge it. |
@bircher I tried to test this on Drupal 8.4.5 but was unable to login. Got following errors:
Also I found following errors in logs: Maybe I'm missing something? |
…or handling with exceptions
Hi @otarza I injected the externalauth and guzzle client services so that we don't need to call any drupal functions any more and that we can in the future unit test the manager service without making a request to facebook. Also with the new exceptions it may be easier to debug what is going on. |
I refactored the code to use only one form and most importantly I refactored the Account manager to work with the code from the frontend as submitted through the form rather than intercepting any request with a "code" argument.