Forum Discussion

husban125's avatar
husban125
New Member
4 years ago

Bearer token not being used in OAuth 2 implicit flow

Hi,

I am trying to use OAuth 2 implicit flow to authenticate. But after authenticating, a JWT token is not used in the header of requests, instead a random 32 character string is used.

 

 

I cannot verify were this is coming from.

Swagger JsDoc:

 

```

import swaggerJSDoc, { Options } from 'swagger-jsdoc';

const options: Options = {
  swaggerDefinition: {
    openapi: '3.0.3',
    info: {
      title: 'Api',
      version: '1.0.0',
    },
    servers: [
      {
        url: '/'
      }
    ],
    components: {
      securitySchemes: {
        Auth0: {
          type: 'oauth2',
          flows: {
            implicit: {
              authorizationUrl: 'https://url.com/authorize',
              scopes: {
                audience: 'https://url.com'
              }
            }
          }
        }
      }
    },
    security: [
      {
        "Auth0": []
      }
    ]
  },
  apis: ["./controllers/*"]
};

const swaggerSpec = swaggerJSDoc(options);

export default swaggerSpec;

```

thanks

No RepliesBe the first to reply