Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect_mismatch v0.20.0 #249

Open
tormodmacleod opened this issue Apr 15, 2024 · 2 comments
Open

redirect_mismatch v0.20.0 #249

tormodmacleod opened this issue Apr 15, 2024 · 2 comments

Comments

@tormodmacleod
Copy link

hello,

i'm new to restish. i installed it and configured it the same as a colleague

$ cat ~/.config/restish/apis.json
{
  "$schema": "https://rest.sh/schemas/apis.json",
  "cp": {
    "base": "https://some_aws_api_gateway_url.eu-west-1.amazonaws.com/dev",
    "profiles": {
      "default": {
        "auth": {
          "name": "oauth-authorization-code",
          "params": {
            "authorize_url": "https://some_aws_cognito_endpoint.eu-west-1.amazoncognito.com/oauth2/authorize",
            "client_id": "some_client_id",
            "scopes": "openid email profile cp/api",
            "token_url": "https://some_aws_cognito_endpoint..eu-west-1.amazoncognito.com/oauth2/token"
          }
        }
      }
    },
    "tls": {}
  }
}

his set up worked, mine didn't. it looks like it's an issue with version 0.20.0 as he was running version 0.19.0

$ ./restishv19 --version && rm ~/.cache/restish/cache.json 
restishv19 version 0.19.0
$ ./restishv19 cp

the above works fine but

$ ./restishv20 --version && rm ~/.cache/restish/cache.json 
restishv20 version 0.20.0
$ ./restishv20 cp

produces the following error in the browser

image

@DominicBortmes
Copy link

which OS do you two use? to looks like it may be an duplicate of the issue I filed recently #248.
btw: amazon cognito showing such an error typically indicates that your requests mismatch with what cognito’s oidc idp server expects. in my the referenced issue above, i found missing http query parameter (when restish fired the authorize requested) also yielded a similar error page as you’re facing.

@tormodmacleod
Copy link
Author

@DominicBortmes we use Fedora. the issue seems to be related to the trailing / on the redirect url. the default was changed in v0.20.0. i've created #250 but in the meantime the workaround for me is just to add

            "redirect_url": "http://localhost:8484/"

to my config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants