Denoder / nuxt-module-alternatives

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

Google Oauth #108

Closed agracia-foticos closed 1 year ago

agracia-foticos commented 2 years ago

Environment

Reproduction

we are implementing authentication and despite the fact that we enter Google, we authenticate ourselves and it returns us correctly to the web, we cannot access the nuxt.config.ts endpoints

image

We have forced the token and the userInfo to incorrect values ​​to see if an error was thrown somewhere, but nothing, it doesn't happen there...

What can be happening?

La cookie además se setea correctamente image

Describe the bug

we are implementing authentication and despite the fact that we enter Google, we authenticate ourselves and it returns us correctly to the web, we cannot access the nuxt.config.ts endpoints

image

We have forced the token and the userInfo to incorrect values ​​to see if an error was thrown somewhere, but nothing, it doesn't happen there...

What can be happening?

La cookie además se setea correctamente image

Additional context

No response

Logs

No response

Denoder commented 2 years ago

your environment section says that you do not have @nuxtjs-alt/http installed. You need to use that module for the auth module to function.

agracia-foticos commented 2 years ago

It seems that you are already answering me, but I have a question:

token: 'http://localhost:3000/login/google/token', userInfo: 'http://localhost:3000/login/google/user/'

These two enpoints must be "server route api"? Or pages.vue?

Denoder commented 2 years ago

I do not understand your question

agracia-foticos commented 2 years ago

I'm trying to collect the Google OAuth information, but I don't see where the object with the information of the name, user, etc...

image

I do not see in any of these objects the way to retrieve the data of the user from Google

In fact, this auth._token.google object is an html, which is curious to me, hence the doubt that perhaps those endpoints are returning html because they are really "page" objects (inside the pages folder)

Denoder commented 2 years ago

can you try version 2.0.30 to see if you're still getting the same issue?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

agracia-foticos commented 2 years ago

With 2.0.30 same issue

image

image

I don't see where is the object with the info (email, name, etc) received from Google Oauth

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mittci commented 1 year ago

auth_token: Bearer <!DOCTYPE html> is the html of 404 nuxt page? I seen that token with local strategy when I do something wrong, don't remember what

agracia-foticos commented 1 year ago

auth_token: Bearer is the html of 404 nuxt page? I seen that token with local strategy when I do something wrong, don't remember what

The endpoints you use are vue page paths, or are they API server paths? Currently they are pages, but perhaps they should be API routes so that the HTML code of the layout is not injected

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.