nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.93k stars 924 forks source link

[Nuxt-Bridge] Redirect to _auth/oauth/discord/authorize works in dev build but fails in prod build #1579

Open Jay-Madden opened 2 years ago

Jay-Madden commented 2 years ago

Version

"@nuxtjs/auth-next": "^5.0.0-1642755117.7a526bb",
"@nuxtjs/axios": "^5.13.6",
"nuxt-edge": "latest",

Nuxt configuration

mode:

Nuxt configuration

  auth: {
    strategies: {
      local: {
        endpoints: {
          login: {
            url: '/authorize/login',
            method: 'post',
            propertyName: 'bearer',
          },
          user: {
            url: '/authorize/user',
            method: 'get',
            propertyName: 'user',
          },
          logout: false,
        },
        tokenRequired: true,
        tokenType: 'Bearer',
      },
      discord: {
        clientId: process.env.DISCORD_CLIENT_ID,
        clientSecret: process.env.DISCORD_CLIENT_SECRET,
        codeChallengeMethod: '',
        scope: ['identify', 'guilds'],
        grantType: 'authorization_code',
      },
    },
  },

What is expected?

Redirect should work correctly in prod build as it does in the dev build image

What is actually happening?

Redirect to _auth/oauth/discord/authorize fails with a 404 in prod build image

Checklist

Jay-Madden commented 2 years ago

linked to nuxt/framework#1519

bmulholland commented 2 years ago

https://github.com/nuxt-community/auth-module/issues/1519 not nuxt/framework#1520 :)

Jay-Madden commented 2 years ago

edited, is there anything that can be done about this?

bmulholland commented 2 years ago

Please don't read this as snarky: Yes, you can investigate and submit a PR.

I don't have a repro.

I'm trying to test out my app, which doesn't use Discord, to see if it has this same problem. Unfortunately, I am blocked by nuxt/bridge#27

fiftyy commented 5 months ago

Any news here?