Matteo182
Forum Replies Created
-
Forum: Plugins
In reply to: [YOP Poll] admin side it doesn’t load the css and it doesn’t save the fieldsI had an issue with the server not loading the plugin stylesheets properly, so I manually loaded them and that fixed it.
Forum: Plugins
In reply to: [OpenID Connect Server] the root /userinfo replies 404I did a bit of debugging and the error I get in the logs is this:
OAuth2\Response Object
(
[version] => 1.1
[statusCode:protected] => 401
[statusText:protected] => Unauthorized
[parameters:protected] => Array
(
)[httpHeaders:protected] => Array ( [WWW-Authenticate] => Bearer realm="Service" ))
Forum: Plugins
In reply to: [OpenID Connect Server] if a user is not registered on WordPressHi Paolo, thanks for the help you are giving me,
so I managed to go around starting from the endpoint /wp-json/openid-connect/v1/authorize
from here I redirect to my login/register page, in case it is the first access I go to the authorization created by you
and after authorization I land on my additional form for double optin and other required data.
from the whole flow I bring along the query string with the ‘code’ :
/?code=ea29c0205e017692c7b24fdbaa39690d99359da2&state=4secret5string
At this point, I would like to ask you what the normal flow involves? should I pass this token to the platform that called the WP server?
Can he use this token to call the endpoint to request user data?
i mena this endpoint : /wp-json/openid-connect/v1/userinfo
or can I send them the user data when they have finished filling out this last custom form? This way I would avoid having to call another endpoint, what do you think?
Thank you very much if you could give me this other clue, I think I’ve closed the loop.
Best regards
Forum: Plugins
In reply to: [OpenID Connect Server] Fatal error after autorizationIt worked for me Switching from RS256 to HS256 works fine! I changed it in the plugin configurations, but maybe there is something in my server that is not right, for the moment I’ll go ahead with this.
Forum: Plugins
In reply to: [OpenID Connect Server] Initial configurationok I understood the error, I modified the random string of the array index
add_filter( 'oidc_registered_clients', 'iquii_oidc_clients' );function iquii_oidc_clients() { return array( 'postman' => array( 'name' => 'postman', 'secret' => 'a secret string', 'redirect_uri' => 'https://www.getpostman.com/oauth2/callback', 'grant_types' => array( 'authorization_code' ), 'scope' => 'openid profile', ), );}Forum: Plugins
In reply to: [OpenID Connect Server] Initial configurationi make this call /wp-json/openid-connect/v1/authorize?response_type=code&client_id=postman&scope=openid profile&redirect_uri=https%3A%2F%2Fwww.getpostman.com%2Foauth2%2Fcallback
and i register the client in this way :
add_filter( 'oidc_registered_clients', 'iquii_oidc_clients' );
function iquii_oidc_clients() {
return array(
'client_id_random_string' => array(
'name' => 'postman',
'secret' => 'a secret string',
'redirect_uri' => 'https://www.getpostman.com/oauth2/callback',
'grant_types' => array( 'authorization_code' ),
'scope' => 'openid profile',
),
);
}but i receve this error:
{
“error”: “invalid_client”,
“error_description”: “The client id supplied is invalid”
}
Did I make a mistake in recording the client or the call?
- This reply was modified 1 year, 11 months ago by Matteo182.
Forum: Plugins
In reply to: [OpenID Connect Server] Initial configurationI think I solved the permalink problem, i add .'/v1', at the end of prefix , the function is :
add_action(
'rest_api_init',
function () use ( $route, $methods, $args ) {
register_rest_route(
self::PREFIX.'/v1',
$route,
array(
'methods' => $methods,
'permission_callback' => '__return_true',
'callback' => array( $this, 'handle_rest_request' ),
'args' => $args,
)
);
}
);and now the respons with Postman is :
{
"code": "rest_missing_callback_param",
"message": "Parametro(i) mancante(i): client_id, response_type",
"data": {
"status": 400,
"params": [
"client_id",
"response_type"
]
}
}the answer is like this because I’m not calling from the client URL I registered right? But was the v1 endpoint registered correctly?
Forum: Plugins
In reply to: [OpenID Connect Server] if a user is not registered on WordPresscompared to the file you sent me I think that here I can redirect to another form by replacing wp_login_url() with my custom url form ?
wp_safe_redirect( add_query_arg( array_map( ‘rawurlencode’, array_merge( $request->getAllQueryParameters(), array( ‘action’ => ‘openid-authenticate’ ) ) ), wp_login_url() ) );
or i must modify the auth_redirect() whit other custom function ?
- This reply was modified 1 year, 11 months ago by Matteo182.
Forum: Plugins
In reply to: [OpenID Connect Server] Initial configurationI tried to modify the permalinks as it says in the link you wrote to me, if I use the permalinks with Simple structure, the first one so to speak, if I make the call it replies by sending me the home page, I don’t know if this is correct, I was expecting an answer via json ?
however, if I use any other structure it always gives me a 404 error, even if I use the custom structure and remove the / at the end, it always gives me a 404.
Maybe I need to call the endpoint by sending it the user’s email?
Forum: Plugins
In reply to: [OpenID Connect Server] if a user is not registered on WordPressok I understand, so if I wanted to add a control with a validation via SMS message, and and I need to add additional fields for permissions I would have to add it to my normal WordPress registration right?
or can I create an additional form to call up and fill out before giving authorization? where can I find the redirection you make to the login form? Can I replace it with a redirection to another form customized by me?
thank you very much
Forum: Plugins
In reply to: [OpenID Connect Server] Passing user data to the customer after loginperfect thank you very much very kind
Forum: Plugins
In reply to: [Google for WooCommerce] products do not synchronizeok I changed my Google ADS account and now it’s started, maybe there was something wrong with the other account. That’s fine. Thank you very much
Forum: Plugins
In reply to: [Google for WooCommerce] products do not synchronizeHi , @omarfpg I created the Google ADS account, the only thing I haven’t done is create the campaign since I don’t have any products yet, I want to wait. do I have to create the campaign too? or is there anything else I can check? thank you very much
Forum: Plugins
In reply to: [The Events Calendar] integrate Google Calendar with Google Mapsthis is exactly what I was looking for,
https://demo.theeventscalendar.com/events/map/
I will get the PRO plugin and hope it’s easy to configure it this way
thank you very much
I’m sorry but you read it wrong, the site is not a multisite, in fact it says in the report:
WP Version: 6.4.1<br>WP Multisite: –in the center of the two strings there is a newline <br>, so the multisite line is WP Multisite: –
which means it is not a multisite.
so can you help me please?