We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a5fc50 commit ccf7ba0Copy full SHA for ccf7ba0
src/runtime/composables/local/useAuthState.ts
@@ -76,6 +76,13 @@ export function useAuthState(): UseAuthStateReturn {
76
secure: config.refresh.token.secureCookieAttribute,
77
httpOnly: config.refresh.token.httpOnlyCookieAttribute
78
})
79
+
80
+ // Set default value if `useState` returned `null`
81
+ // https://github.com/sidebase/nuxt-auth/issues/896
82
+ if (rawRefreshToken.value === null) {
83
+ rawRefreshToken.value = _rawRefreshTokenCookie.value
84
+ }
85
86
watch(rawRefreshToken, () => {
87
_rawRefreshTokenCookie.value = rawRefreshToken.value
88
0 commit comments