Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

400 Bad Request on Token request #114

Open
CowCatDE opened this issue Apr 22, 2024 · 0 comments
Open

400 Bad Request on Token request #114

CowCatDE opened this issue Apr 22, 2024 · 0 comments

Comments

@CowCatDE
Copy link

CowCatDE commented Apr 22, 2024

Environment

<script setup>

const $auth = useAuth()
onBeforeMount(()=>{
userLogin()
})
async function userLogin() {
try {
const response = await $auth.loginWith('discord')
console.log(response)
} catch (err) {
console.log(err)
}
}
</script>

Nuxt Config

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: [
'@nuxt-alt/auth',"@pinia/nuxt"
],
auth: {
globalMiddleware: true,
redirect: {
login: "/",
home: "/",
callback: "/"
},
strategies: {
discord: {
clientId: 'XXXXXXXXXXXXXXXXXXXXXX',
clientSecret: 'XXXXXXXXXXXXXXXXXXXXXX'
},
}
}
})

Reproduction

https://github.com/CowCatDE/nuxt-alt-auth-error

Describe the bug

When the user authorizes himself via discord he gets a 400 Bad Request error.
image
image

Additional context

No response

Logs

No response

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant