Topic-icon {"serviceErrorCode":65604,"message":"Empty oauth2 access token","status":401}"

1 year 8 months ago - 1 year 8 months ago #68137 by olivus
Hi,

I recently purchased the JFBConnect component and installed the SCLogin module as well. I configured the LinkedIn authentication with Client ID and Client Secret keys.
Login via LinkedIn is working well but I encountered the following issue with SCLogin :a/ Login via username/password is not working, leading to the following error message : "Error code 401 received requesting data: {"serviceErrorCode":65604,"message":"Empty oauth2 access token","status":401}"b/ Connexion button width : where and how to resize the connexion button to make it the size of the Register button…with both buttons on the same line. I have tried to edit and make change to the default and sourcecoast themes (under media/sourcecoast/themes/sclogin) but what enable to identify the variable and row to adjust/correctc/ Link text alignment on the left : what file ? what row/variable to change/adjust

Any help, would be much appreciated
Thanks

PS :
o I cache/uncache JFBConnect option without success re  issue a)
o I did double-check that:
* I have the latest version of JFBConnect installed - v9.0.147
* I've enabled the JFBConnect Authentication, User and System plugins?
* I successfully went through all steps of your LinkedIn Setup Guide

Tell me where is the PM link/form so I can share with you the admin credentials
Attachments:
Last edit: 1 year 8 months ago by olivus.
The topic has been locked.
Support Specialist
1. The only time that we've encountered that error before is with the LinkedIn channels / SCSocialStream module, but that bug should have been fixed back in 9.0.151. Use the Contact Us form in our menu to send your website credentials so we can investigate further.

2. Width of the button and get the two buttons on the same size. There's a style on your page that is setting the width of the button to 100%. Add this:
#cboxLoadedContent .sclogin-joomla-login button {
    width: auto;
    margin-bottom: 0px !important;
}

3. There's a padding on that <ul> tag. Add this
.sclogin.ns-bs5 ol, .sclogin.ns-bs5 ul {
    padding-left: 0px;
}

-Melissa
The topic has been locked.
Hey mel,

1) website credentials provided in the "Contact Us form" re ticket#68137
Please note that we are not using SCSocial Stream so module has not been enabled - we are not par of the LinkedIn Marketing Developer Program

2 & 3) can you please clarify what file to use .... from the following forders
/home/xxxxx/www/media/sourcecoast/themes/sclogin
/home/xxxxx/www/media/sourcecoast/css
/home/xxxxx/www/plugins/jfbconnect
/home/xxxxx/www/templates/mcreative/css
/home/xxxxx/www/templates/mcreative/css/bootstrap
/home/xxxxx/www/templates/mcreative/html

Thanks
The topic has been locked.
Support Specialist
The backend has additional htaccess security, so that needs to be temporarily disabled for the backend user/pass to work. However, I attempted to log in on the front-end with the credentials and was successful. I didn't see any oauth2 error as described above. Can you provide screenshots or detailed steps on how to reproduce? I didn't see it anywhere on the page

We suggest creating your own theme as described here .
The following user(s) said Thank You: olivus
The topic has been locked.
1 year 8 months ago - 1 year 8 months ago #68147 by olivus
Thanks mel

1) I sent you via the contact form the additional credentials for the backend,

Yesterday PM, the issue with the "Empty oauth2 access token" was fixed .... but it's coming back today. It seems to be linked to the cache (com_jfbconnect). If I stay within the cache duration (set to 15min), I can either connect via joomla or LinkedIn, but passing the cache duration, I can only connect via LinkedIn, using the Joomla credentials is leading to the same error message.

To reproduce the bug :

option a ) from the frontend try to connect with following credentials olivus/olivus and you will get the oauth2 error message.
This account has between created via the joomla registration form first and then user connected via LinkedIn + mapping function, so there are probably some conflict between the 2

option b) If you follow this flow : step1) creating your account via joomla registration form step 2) connecting via LinkedIn with your personal account (same email as step ) step 3) within the "JFBconnect cache duration" connecting again via your joomla credentials instead of the LinkedIn button (should work fine) step 4) after the cache duration, connecting again via your joomla credentials instead of the LinkedIn button will lead to the error message

In first instance, account credentials I provided you with, were created from the joomla registration only and as you never mapped it to LinkedIn registration it worked well and did not create any issue as it is bypassing the Social Login process

2) I finally found the right file for the update. Thanks a lot for fixing the issue

3) Only remaining issue is with the mobile version (responsive) - see pic in attachment
what should I change to the attached zip/css file for

a) avoiding the username/pswd icon issue
b) deleting the bullets before the link and aligning on the left

Thanks for your help
Attachments:
Last edit: 1 year 8 months ago by olivus.
The topic has been locked.
Support Specialist
1. Thank you for the details and the new credentials. I was able to reproduce and fix the issue on your site. The issue was with trying to fetch the avatar for the LinkedIn user and not checking the access token properly. The behavior was different based on whether the user had been mapped or not. Please let me know if you encounter the error again; the fix is checked in for our next release.

3.a. There is a conflict with your template. Add something like the following. You can also add a media query to the CSS if you need to target a specific screen size.
.sclogin span {
    background: #e9ecef !important;
    padding: 0.5rem 0.375rem !important;
    color: #212529;
}

3.b. The ul element needs the list style of none like
.sclogin ul {
    list-style: none;
}
The topic has been locked.
Hey mel,
Thanks for your fix re 1, 3a and 3b
all is working well !
Hope you and your family are going well
You rock !
Charlotte
The topic has been locked.
Support Specialist
Glad I could help. Let us know if you run into any further problems

-Melissa
The topic has been locked.