SohoHouse / nuxt-oauth

Simple OAuth2 integration for your Nuxt app
MIT License
122 stars 27 forks source link

Infinite loop on canceling in OAuth authorize page #57

Open Venefilyn opened 4 years ago

Venefilyn commented 4 years ago

When canceling from the OAuth provider, it redirects back to callback but fails to handle correctly. Instead choosing to redirect back to OAuth login

image

Error: The resource owner or authorization server denied the request.
    at getAuthError (\node_modules\client-oauth2\src\client-oauth2.js:122:15)
    at CodeFlow.getToken (\node_modules\client-oauth2\src\client-oauth2.js:603:13)
    at Handler.authenticateCallbackToken (\node_modules\nuxt-oauth\lib\handler.js:97:40)
    at \node_modules\nuxt-oauth\lib\server-middleware.js:48:20 {
  body: [Object: null prototype] {
    error: 'access_denied',
    error_description: 'The resource owner or authorization server denied the request',
    state: 'eyJyZWRpcmVjdFVybCI6Ii8ifQ=='
  },
  code: 'EAUTH'
}
bat79a commented 4 years ago

I just upgraded to version 2.5.1 and I also have an infinite loop. I had to downgrade the version to the previous one I was using : 2.4.1