Forum Replies Created

Viewing 15 replies - 1 through 15 (of 35 total)
  • Thread Starter Matteo182

    (@matteo182)

    I had an issue with the server not loading the plugin stylesheets properly, so I manually loaded them and that fixed it.

    Thread Starter Matteo182

    (@matteo182)

    I 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"
        )

    )

    Thread Starter Matteo182

    (@matteo182)

    Hi 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

    Thread Starter Matteo182

    (@matteo182)

    It 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.

    Thread Starter Matteo182

    (@matteo182)

    ok 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',        ),    );}
    Thread Starter Matteo182

    (@matteo182)

    i 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.
    Thread Starter Matteo182

    (@matteo182)

    I 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?

    Thread Starter Matteo182

    (@matteo182)

    compared 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.
    Thread Starter Matteo182

    (@matteo182)

    I 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?

    Thread Starter Matteo182

    (@matteo182)

    ok 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

    Thread Starter Matteo182

    (@matteo182)

    perfect thank you very much very kind

    Thread Starter Matteo182

    (@matteo182)

    ok 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

    Thread Starter Matteo182

    (@matteo182)

    Hi , @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

    Thread Starter Matteo182

    (@matteo182)

    this 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

    Thread Starter Matteo182

    (@matteo182)

    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?

Viewing 15 replies - 1 through 15 (of 35 total)