close
Skip to content

This plugin is compatible with wp-oauth ? #106

Closed

Description

@abnerjacobsen

Hi,

I'm trying to use authorizer using an custom OAUTH server create usin this wordpress plugin https://wp-oauth.com/.

I have wpsite_A actings as an OAUTH server using https://wp-oauth.com/ and another wp and wpsite_B site were I installed authorizer.

When I go to wpsite_B login page and ask to use authorizer SSO I get redirect to wpsite_A login page, fill user/password fields and when redirected to wpsite_B, after successfull login, I got these warnings:

Warning: explode() expects parameter 2 to be string, array given in /home/343858.cloudwaysapps.com/cwtzgadggz/public_html/wp-content/plugins/authorizer/src/authorizer/class-authentication.php on line 584

 Warning: current() expects parameter 1 to be array, null given in /home/343858.cloudwaysapps.com/cwtzgadggz/public_html/wp-content/plugins/authorizer/src/authorizer/class-authentication.php on line 584

And in the login page o wpsite_B the login is denied with this message:

Cannot create a user with empty username.

Any idea how to solve this problem ?

Thanks,

Activity

  1. figureone commented on Oct 22, 2021

    @figureone
    Member

    Can you hook into authorizer_oauth2_generic_authenticated_email and let us know what values are in the $email and $attributes params?

    /**
    * Filter the generic oauth2 authenticated user email.
    *
    * @param string $email Discovered email (or empty string).
    *
    * @param array $attributes Resource Owner attributes returned from oauth2 endpoint.
    */
    $email = apply_filters( 'authorizer_oauth2_generic_authenticated_email', $email, $attributes );

    Alternatively you could create an account for me on your wp-oauth server and I can test it as an endpoint and see what's up.

    You can DM me on WordPress slack (@figureone) if providing any sensitive data.
    https://make.wordpress.org/chat/

    Thanks!

  2. abnerjacobsen commented on Oct 29, 2021

    @abnerjacobsen
    Author

    Paul,

    I have sent to you the server url and user in WP slack chat.

    Thanks,

  3. figureone commented on Nov 1, 2021

    @figureone
    Member

    Aloha, thanks for providing wp-oauth.com testing. We have found and fixed the bug, and a new release will be out shortly, version 3.2.1. Please test when that happens and let us know if it fixes your issue. Thanks!
    ba7ee58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions