Giter VIP home page Giter VIP logo

Comments (4)

sunpeinju avatar sunpeinju commented on August 10, 2024

BTW, currently I'm using koa-send in my app to serve the missing page:

  • 'my_redirect_uri' is my server's oauth callback endpoint.
  • the endpoint is passed to swagger-ui through oauth2RedirectUrl option.
  • add route for 'my_redirect_uri' and send the '/oauth2-redirect.html' page to browser.
app.use(koaSwagger({
  oauthOptions: {...},
  swaggerOptions: {
    oauth2RedirectUrl: my_redirect_uri,
  }
}));

const router = new Router();
router.get(my_redirect_uri, async (ctx) => {
  await send(ctx, '/oauth2-redirect.html', { root: swagger.getAbsoluteFSPath() });
});
app.use(router.routes());

from koa2-swagger-ui.

scttcper avatar scttcper commented on August 10, 2024

its using the cdn because, for our use case, the server was a raspberry pi and it was really slow at serving large blobs because it couldn't compress them quickly and the network isn't great. probably open to a pr

from koa2-swagger-ui.

sunpeinju avatar sunpeinju commented on August 10, 2024

it could be fine if 'oauth2-redirect.html' is also available through cdn. Don't know how to do that.

from koa2-swagger-ui.

aorlowskiddm avatar aorlowskiddm commented on August 10, 2024

This needs to be handled. The issue does not exist in e.g. Swagger editor.

from koa2-swagger-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.