Denoder / nuxt-module-alternatives

Alternative modules to use while waiting for Nuxt 3 Compatibility
MIT License
144 stars 14 forks source link

Issue with redirect callback #115

Closed twuncher closed 2 years ago

twuncher commented 2 years ago

Environment


Reproduction

I cant really reproduce as it requires a login environment, but the bug is self explanitory.

Describe the bug

I am using openIDConnect here is my config,



 auth: {
    enableMiddleware: true,
    globalMiddleware: false,
    redirect: {
      login: "/",
      logout: "/",
      callback: "/auth",
      home: "/dashboard",
    },
    localStorage: false,
    sessionStorage: false,
    strategies: {
      addopenID: {
        scheme: "openIDConnect",

        endpoints: {
          configuration:
            "https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration",
        },
        idToken: {
          property: "id_token",
          maxAge: 60 * 60 * 24 * 30,
          prefix: "_id_token.",
          expirationPrefix: "_id_token_expiration.",
        },
        responseType: "code",
        grantType: "authorization_code",
        scope: "openid profile offline_access User.Read",
        codeChallengeMethod: "S256",
        clientId: process.env.AZURE_APPLICATION_ID,
        clientWindow: false,
      },}

When logging in the redirect URL is going to http://localhost:3000///auth which is not a valid url - it seems to be a problem with the encoding?

it should be http://localhost:3000/auth

### Additional context

_No response_

### Logs

_No response_
Denoder commented 2 years ago

update your auth module

twuncher commented 2 years ago

Thanks all sorted with 2.1.2