Hi, Saifur!
I purchased your plugin and tried to integrate it with my project. I encountered some problems with it. Can you help me fix it?
Firstly, when I try to login via facebook I came across this problem.
Secondly, after redirecting from google, I found that i didn't log in.
Looking forward to your reply. Thanks!
[Issue created by null: 2016-08-17]
[Comment created by null: 2016-08-17]
Thank you for letting me know,man! You did a great job!
On Tuesday, August 16, 2016, Saifur Rahman Mohsin [email protected]
wrote:
@enzewu https://github.com/enzewu I hope you have received the most
recent updates to the plugin which fixes all the components. The plugin is
now updated to current version of OctoberCMS core. Please do not hesitate
to reach out to me should you face any bugs or have queries on the plugin
in future. I would be glad to assist you based on my availability then.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AO5UBz5Q9c37QGXKdVDiL2y6stoEpUKUks5qgl25gaJpZM4JWgjM
.
[Comment created by SaifurRahmanMohsin: 2016-08-17]
@enzewu I hope you have received the most recent updates to the plugin which fixes all the components. The plugin is now updated to current version of OctoberCMS core. Please do not hesitate to reach out to me should you face any bugs or have queries on the plugin in future. I would be glad to assist you based on my availability then.
[Comment created by SaifurRahmanMohsin: 2016-07-29]
No problem. Thank you for purchasing it. Have a great day.
[Comment created by null: 2016-07-29]
Thanks a lot man! It works perfectly!
I will definitely recommend your great plugin to others.
I really appreciate it!
2016-07-29 11:15 GMT-04:00 Saifur Rahman Mohsin [email protected]:
I’ve already made the update so it’s fine anyway. If you wanted to know I
basically replaced the addImage function code with this:
/**
-
Saves an image to disk with the unique name.
*
-
@param string $imageUrl
-
@return File
*/
public function addImage($uniqueName, $imageUrl)
{
$tempFileName = str_slug($uniqueName, "-"). 'jpg';
// Obtain the file from url
$result = Http::get($imageUrl);
$result -> toFile($tempFileName);
$result -> send();
// Save file to disk
$file = new File;
$file -> fromFile($tempFileName);
$file -> save();
return $file;
}
It will fix the FB issue completely. Don’t worry, I’ll be making more
updates to the plugin and improving on it. Not immediately, but definitely.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AO5UB0ft5DKK2YDAlDQP0jXJjOJ1KzGVks5qahkhgaJpZM4JWgjM
.
[Comment created by SaifurRahmanMohsin: 2016-07-29]
I’ve already made the update so it’s fine anyway. If you wanted to know I basically replaced the addImage function code with this:
/**
* Saves an image to disk with the unique name.
*
* @param string $imageUrl
* @return File
*/
public function addImage($uniqueName, $imageUrl)
{
$tempFileName = str_slug($uniqueName, "-"). 'jpg';
// Obtain the file from url
$result = Http::get($imageUrl);
$result -> toFile($tempFileName);
$result -> send();
// Save file to disk
$file = new File;
$file -> fromFile($tempFileName);
$file -> save();
return $file;
}
The original function had one getLocalTempPath
function in the File class which used to be public but now made protected in OctoberCMS core.
It will fix the FB issue completely. Don’t worry, I’ll be making more updates to the plugin and improving on it. Not immediately, but definitely.
[Comment created by null: 2016-07-29]
It will be grateful if you can tell me how to do that. I want to have a
better understanding of your code.
Thank you very much!
2016-07-29 10:16 GMT-04:00 Saifur Rahman Mohsin [email protected]:
Ah! this is the interesting bug I identified as well. This is due to
update in OctoberCMS core, I have already fixed it here. I can push an
update in a couple of hours. Or if you want it urgently and know to modify
the code, I can tell you where to change the code here as a comment.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AO5UBzT_ODz7aMxKUdH9ptEl6rWh3NZNks5qagslgaJpZM4JWgjM
.
[Comment created by SaifurRahmanMohsin: 2016-07-29]
Ah! this was the bug I identified and mentioned earlier. This is due to update in OctoberCMS core, I have pushed an update to octobercms.com and it’s updated as well. I would recommend you to update the plugin from your backend. Enjoy! Feel free to reach out to me should you face any more bugs in this. I will help you resolve it. Have a good day.
[Comment created by null: 2016-07-29]
Hi, Saifur!
Thank you so much for the help!
However, I encountered another problem. This time when I was redirected to my website, I had an error there. And the error is this.
And I happened to find a weird issue. If I created an account with the email same as my facebook account in my database firstly, then tried the facebook login, it will log me in.
If I use a brand new facebook account to log in, I will come across the error above. I know it makes no sense working in this way. I just want to let you know and I hope this can help you figure out the problem.
Thanks again! Looking forward to your reply!
[Comment created by SaifurRahmanMohsin: 2016-07-29]
Hi. This actually means it works. There are some things that has changed with october so I should update the documentation soon. However, let me tell you how to fix this now.
First goto your page’s layout and add the session component. It doesn’t need to be placed anywhere. Just open the layout in CMS section, then hover to Components > User > Session and just click it once. It will add to the layout. This will made the session variables (the variable user
) available on all pages that use that layout.
So now in your login page or wherever you place this component just add,
{% if user %}
<p>Hello {{ user.name }}</p>
{% else %}
{% component 'facebook' %}
{% endif %}
So, the else part will show the component i.e. the sign into FB button. And the if part is what’s shown if the successful login occurs, except if you use the Redirect feature to redirect the user somewhere else. In that case, then again on that page where you redirect the user, you can use the same {% if user %} Show some content for logged in users {% else %}
, or you can even use RainLab User’s session component to do this on that page if you want; as this plugin extends that plugin.
[Comment created by null: 2016-07-28]
Hi, Saifur!
Thank you so much for the reply!
So the current situation is all of the plugins have the same issue: when we are redirected back to our website, nothing happens, we don't log in.
I totally understand your situation. We can wait for other social networks, however, we want to make facebook login work firstly. This one is a little urgent.
Can you help us fix that one today or tell me where the problem is and how to fix it? So I can try to fix it myself.
Also, after fixing the issue with facebook, if you wanna, I can help you fix other social logins, since they all have the same problem. By doing this way, both of us can save some time.
What do you think of this? Looking forward to your reply!
Thanks again!
[Comment created by SaifurRahmanMohsin: 2016-07-27]
That’s great, you are welcome.
No I do not. This is a very old plugin and needs update to the latest OctoberCMS build, a lot has been changed. My original intent was to build a new plugin for the same purpose with a more flexible option of allowing private OAuth servers to be configured as well than just the fixed ones that this plugin offers i.e. Google, Microsoft, LinkedIN, Github and Facebook. But I may most likely improve on this same plugin to incorporate those features. I will re-check and roll out an update to this plugin very soon resolving any issues. If you need any specific provider urgently and it does not work the way it is described as in the documentation then please provide me with details of it and I will help you fix it ASAP. Otherwise, it may take over a week for the update to occur considering the work I have at hand. Once again, thank you for getting my plugin. I hope you enjoy it!
[Comment created by null: 2016-07-27]
Hi, Saifur!
Thank you so much for being so helpful.
That facebook issue has been fixed.
But same issue occurs as google and as other social plugins, when I was redirected back to my website. The user actually didn't log in.
Do you know what is going on there?
[Comment created by SaifurRahmanMohsin: 2016-07-27]
@enzewu Thank you for writing to me. I found that Facebook has updated their panel. So now you need to do this..
- Goto your app and click on it’s name. It will take you to dashboard.
- In products, click Add product and it will take you to Product Setup page. Add Facebook Login. This will now show up as a tab. Inside that make sure you put the page URL of where you placed the social login button under Valid OAuth redirect URIs. For example http://mywebsite.com/login
- Click Settings (below Dashboard) and then in Basic tab, scroll down and press Add Platform, Click website and then put in the URL of your website.
I will update the documentation soon to reflect for the new panel. I have also found another interesting bug now so I will most likely update this plugin soon. I hope this solves your issue. I’ll close it for now but do let me know if you still face any issue. If it’s the same then please comment here and I will re-open it. Otherwise if it’s different issue, feel free to make a new issue. Enjoy the plugin!
[Comment created by null: 2016-07-27]
Thank you so much man!
[Comment created by SaifurRahmanMohsin: 2016-07-27]
Please wait. I will verify it and give you the solution.