[Vuejs]-NuxtJS – Google Auth: ExpiredAuthSessionError: Both token and refresh token have expired. Your request was aborted

0👍

Update google auth config like this:

google: {
        responseType: "code",
        clientId:"<google client ID>",
        codeChallengeMethod: "",
        grantType: "authorization_code",
        redirectUri: `${baseUrl}/verify-auth`,

token: {
          property: "data.token", // <-- based on your API response (endpints.login)
          required: true,
          type: "",
          maxAge: 18000,
        },
        user: {
          property: "data",
          autoFetch: true,
        },
        endpoints: {
          login: { url: "{your google auth API}", method: "post" }, // <-- should return response with token on it
          logout: { url: "/api/profiles/logout", method: "get" },
          user: { url: "/api/profile", method: "get" },
        },
      }

Leave a comment