authjs-nuxt icon indicating copy to clipboard operation
authjs-nuxt copied to clipboard

Set 'response_type':'token' trows invalid request with google provider

Open YoimarMoreno opened this issue 2 years ago • 1 comments

Environment

Hello, I hope my English will be enough to tell you what exactly is happen. Look, I'm trying to implement login with google provider in order to get a token, this token has the next format: (ya29.a0AfB_by...) The thing is when I clicked on google login button I got the next error messsage:

message

Last days I've been traying many solutions but nothing worked. The most common solution you will find on internet is to set explicitly code_challenge and code_challenge_method as an empty string, but it doesn't work.

Check my [...].js file

3

Reproduction

  1. Create a nuxt project
  2. install de followind dependencies: "@auth/core": "0.17.0" and "@hebilicious/authjs-nuxt": "0.3.5"

4

  1. create a button or whatever you want to trigger the sign In event with google as provider... 4

  2. remember set the response_type as token in the [...].js file 6

If you followed the steps up to this point, then you should see the same error message on the screen...

trust me... I don´t know what to do... I was using sidebase and face the same problem. I'm starting to think is must to be a bug or something like that.

Describe the bug

When set response_type as token, google says that there ir an error with the params code_challenge_method and code_challenge.

Additional context

No response

Logs

No response

YoimarMoreno avatar Dec 05 '23 20:12 YoimarMoreno

This isn't related to this module which just binds @auth/core and Nuxt. You'll have to investigate this on your own. I'd recommend starting with one of the working examples code, and working your way up from there.

Hebilicious avatar Dec 24 '23 11:12 Hebilicious