eljara
Forum Replies Created
-
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowHi , @picaland i just noticed something weird
Every REST API requests needs authentication and if no token is provided i get jwt_auth_no_auth_headerForum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowYes, i got confused between things
Everything works like great for both Google and Facebook login
Thank you a lot
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowAfter few hours of researching i solved it
How does the plugin response in case of a new login , does it create a user beacause i run to this error tying to log with new gmail :
Error getUserIDByProviderIdentifier() Get user id by social id (user id is null)Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowI tried to flow this tutorial , but using google + instead of youtube
but no success , do i generate an access token for every user that login or just one access token .
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowHi , @picaland
Sorry to bother you again
Any idea what is the difference between access_token and id_token for google, and if you have any tutorial on how to get google access_token , i need it for Android but anything to start with will do
{“access_token”:”xxxxxxxxx”,”expires_in”:3600,”id_token”:”xxxxxxxxx”,”token_type”:”Bearer”}
thank you
Google
{“access_token”:”xxxxxxxxx”,”expires_in”:3600,”id_token”:”xxxxxxxxx”,”token_type”:”Bearer”}
what is the difference between access_token and id_token here ?
In this documentation
https://firebase.google.com/docs/auth/admin/verify-id-tokensi found how to get the id_token i guess , but how can i find access token for google , thank you
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowI noticed that the plugin doesn’t return an avatar , i think it’s very easy and useful
for facebook i think this should work
“https://graph.facebook.com/”.FacebookUserId.”/picture?type=large”Do you call the FacebookUserId anywhere in your plugin ??
so that i can update user_meta and set an avatar- This reply was modified 5 years ago by eljara.
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowdone , i hope you can provide a website for your plugins in English so more people will reach you in future,
I was just lucky to find your discussion here, the plugin is very useful specially for people who wants to connect their blogs with an android app like i did
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowThank you very much , it’s working now i just cheeked
Thank you for your time , i wish you the best
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowThis is the request that i send and the response that i get, i tried reinstalling all the plugins
request
https://pasteboard.co/ITItYJf.pngresponse
https://pasteboard.co/ITIufGG.pngForum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flow@picaland
“Is the NSL plugin properly configured for Facebook?”Yes it is , when i login from the website everything works as expected
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowYou have the latest version of both plugins ?
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowAfter i get the fb tokin,
I send a POST to : mywebsite/wp-json/api/v1/social-login/facebook/With these parameters:
access_token, email, token_type, expires_in
Where access_token us the token thqt i get from facebook login
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowThank you for your time ,
So what i did is i got facebook token (my_fb_token) then using POSTMAN i sent
{“access_token”:”my_fb_token”,”token_type”:”bearer”,”expires_in”:5183946,”email”:”[email protected]”}
But he response of the social login request is not identical to that of the native login , i got “Authentication successful” in response but what i really need is the token generated by JWT so that i can perform any protected requests
The response that i get :
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>Authentication successful</title>
<script type=”text/javascript”>
try {
if (window.opener !== null && window.opener !== window) {
var sameOrigin = true;
try {
var currentOrigin = window.location.protocol + ‘ //’ + window.location.hostname;
if (window.opener.location.href.substring(0, currentOrigin.length) !== currentOrigin) {
sameOrigin = false;
}
} catch (e) {
// Blocked cross origin
sameOrigin = false;
}
if (sameOrigin) {
window.opener.location = “https://mydomaine.com”;
window.close();
}
}
}
catch (e) {}
window.location = “https://mydomaine.com”;
</script>
<meta http-equiv=”refresh” content=”0;https://mydomaine.com”>
</head>
<body>
</body>
</html>- This reply was modified 5 years ago by eljara.
Forum: Plugins
In reply to: [Nextend Social Login and Register] REST api social login work flowI am sorry to bother you, but when the plugin is activated i get theis error every ime i try to login with
https://mywebsite.com/wp-json/jwt-auth/v1/token?username=test&password=test
[07-Feb-2020 19:37:16 UTC] PHP Fatal error: Uncaught Error: Class ‘RestApi’ not found in /home/mywebsite/wp-content/plugins/extended_nsl_jwt_social_login_rest_api/index.php:946
Stack trace:
#0 /home/ask.jaratii.com/wp-includes/class-wp-hook.php(288): {closure}(Object(WP_REST_Server))
#1 /home/16 /wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array)
#2 /home/16 /wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#3 /home/16 /wp-includes/rest-api.php(471): do_action(‘rest_api_init’, Object(WP_REST_Server))
#4 /home/16 /wp-includes/rest-api.php(298): rest_get_server()
#5 /home/16 /wp-includes/class-wp-hook.php(288): rest_api_loaded(Object(WP))
#6 /home/16 /wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(”, Array)
#7 /home/16 /wp-includes/plugin.php(544): WP_Hook->do_action(Array)
#8 /home/16 /wp-includes/class-wp.php(387): do_action in /home/16 /wp-content/plugins/extended_nsl_jwt_social_login_rest_api/index.php on line 946what could be the problem ?