#swagger oauth2-redirect.html path sent to oauth is incorrect and I'm not able to find how to change

1 messages · Page 1 of 1 (latest)

potent imp
#

Hello guys, when I reach google auth page, redirect_uri equals = http://localhost:3000/api/oauth2-redirect.html, but if u try to access it gives you 404.

I want to setup to /swagger/ui/oauth2-redirect.html, where can I do it?

Thanks

potent imp
#

I tried it but doesn't work here

#

Solved! Must be inside swaggerOptions

    SwaggerModule.setup(
        'swagger/ui',
        app,
        document,
        {
            swaggerOptions: {
                oauth2RedirectUrl: 'https://url/swagger/ui/oauth2-redirect.html',
            },
            useGlobalPrefix: false,
            yamlDocumentUrl: '/api/openapi.yaml',
            jsonDocumentUrl: '/api/openapi.json'
        });