clerk authentication with google oauth is being a pain at the moment. The documentation states that the refresh token will automatically be used to retrieve access token, but unless I have recently signed in, I get: errors: [
{
code: 'oauth_missing_refresh_token',
message: 'Cannot refresh OAuth access token',
longMessage: "The current access token has expired and we cannot refresh it, because the authorization server hasn't provided us with a refresh token",
meta: [Object]
}
]
#Anyone using Clerk for auth?
1 messages · Page 1 of 1 (latest)
Hi @amber delta. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Yes, Clerk is indeed one of the authentication solutions compatible with Next.js. According to the official Next.js documentation, Clerk is listed as a supported authentication provider for both the App Router and Pages Router configurations Next.js Docs - App Router Authentication (https://nextjs.org/docs/app/building-your-application/authentication#examples) Next.js Docs - Pages Router Authentication (https://nextjs.org/docs/pages/building-your-application/authentication#examples).
Regarding the specific issue you're encountering with Google OAuth and refresh tokens, I don't have enough information in the provided knowledge sources to directly address this problem. The error you're seeing suggests that the OAuth flow isn't providing a refresh token, which is preventing Clerk from automatically refreshing the access token as expected.
This seems to be a specific implementation issue that might require looking into your Clerk configuration, Google OAuth settings, or how the authentication flow is set up in your Next.js application.
For the most up-to-date and accurate information on resolving this issue, I would recommend:
- Checking the official Clerk documentation for Next.js, which can be found at Clerk Docs - Next.js Quickstart (https://clerk.com/docs/quickstarts/nextjs).
- Reaching out to Clerk's support channels or community forums for specific help with this error.
- Verifying your Google OAuth configuration to ensure it's set up to provide refresh tokens.