swagger-editor icon indicating copy to clipboard operation
swagger-editor copied to clipboard

Validation error oauth2RedirectUri configuration is not passed

Open SzymonKlimuk opened this issue 6 years ago • 8 comments

the issue https://github.com/swagger-api/swagger-editor/issues/1503 is closed to I open the new one.

the old issue said:

"When Swagger is deployed with authentication type: "ACCESSCODE" or "IMPLICIT" OAuth 2.0 authorization is failing on Swagger Editor with the following error: validation error oauth2RedirectUri configuration is not passed. Oauth2 authorization cannot be performed.

Authorization works without any problem on Swagger UI."

STEPS TO REPRODUCE:

  1. go to: http://editor.swagger.io - Swagger Petstore is loaded [ Base URL: petstore.swagger.io/v2 ]
  2. click on 'authorize' button
  3. enter client_id in the implicit flow
  4. check both scopes
  5. click 'authorize' button

ERROR:

validation erroroauth2RedirectUri configuration is not passed. Oauth2 authorization cannot be performed.

SzymonKlimuk avatar Sep 27 '17 09:09 SzymonKlimuk

@SzymonKlimuk I am facing the same issue with ACCESSCODE flow. Did you find a solution. I have modified the following on the petstore yaml

securityDefinitions:
  petstore_auth:
    type: oauth2
    authorizationUrl: 'https://domain/adfs/oauth2/authorize?redirect_uri=https://domain/redirect.aspx'
    tokenUrl: 'https://domain/adfs/oauth2/token'
    flow: accessCode
    scopes:
      'write:pets': modify pets in your account
      'read:pets': read your pets

danova123 avatar Oct 02 '17 17:10 danova123

This is related to Swagger Ui inside the Swagger Editor. The same yaml/json works ok (more or less) on the standalone Swagger UI

SzymonKlimuk avatar Oct 03 '17 06:10 SzymonKlimuk

I had the same problem, any update about it?

dieffrei avatar Apr 09 '18 16:04 dieffrei

I am still waiting for any response from swagger team

SzymonKlimuk avatar Apr 12 '18 11:04 SzymonKlimuk

Bug confirmed - we need to provide an OAuth redirector in the Docker image.

shockey avatar Aug 28 '18 20:08 shockey

@shockey Is #1969 a duplicate of this? Or at least an overlap. Is there traction?

leifjones avatar Nov 05 '20 16:11 leifjones

i have the same problem how to fix?

TSorawich avatar Jul 06 '23 07:07 TSorawich

so it only error in new swagger editer(next) i will just use the old one

TSorawich avatar Jul 07 '23 10:07 TSorawich