Skip to content

Connect fails with invalid redirect uri #1

Closed

Description

@mathetos

I installed Spacefast Frames on a WordPress site and clicked Connect Spacefast. Sign-in opened, then stopped with "Couldn't complete sign-in" and "invalid redirect uri."

Frames registers a callback on the settings screen, options-general.php?page=spacefast-frames&spacefast_oauth=callback, and builds the authorize URL with add_query_arg(). The Spacefast for WordPress plugin builds that same kind of URL with http_build_query() and PHP_QUERY_RFC3986. The comment there says add_query_arg() leaves the callback query string unencoded, so &spacefast_oauth=callback shows up as its own authorize parameter, and the redirect URI no longer matches the one that was just registered.

I changed start_oauth() in packages/wordpress-plugin/includes/class-spacefast-frames-api.php to build the URL the same way. Connect then completed.

Activity

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