nuxt-alt / auth

An alternative module to @nuxtjs/auth
https://nuxt-alt-auth.vercel.app/
MIT License
96 stars 20 forks source link

oAuth2 login not working in version 2.3.12 #49

Closed steklopod closed 1 year ago

steklopod commented 1 year ago

I have my own backend that provides oAuth2 flow. So I am not using oAuth2 functionality from the nuxt-alt lib. In version 2.3.11 I am logged in and have such cookies:

Снимок экрана 2023-04-20 в 13 00 14

It seems like nuxt-alt/auth duplicates my .server.cookie (server.cookie without dot in domain column). But it works.

With version >2.3.12 (up to the latest) I am not logged in and only .server.cookie with dot at the beginning presents


I saw that function getCookies() was removed in 2.3.12 https://github.com/nuxt-alt/auth/commit/81c7ae0b2a93d372c65d9fdfe9e33632eaea38f5

Снимок экрана 2023-04-20 в 13 12 04
Denoder commented 1 year ago

the leading dot notation of the cookie (.colaba.online) would be able to work with the nod dot one (colaba.online) if that's what set in the domain otherwise the duplication is unnecessary.

steklopod commented 1 year ago

Thank for the reply. I can prove that removing dot . prefix from cookie's domain solved the problem. So oAuth2 works with the latest version 2.4.2 👍🏻