-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nextjs): Clock skew error message #1661
Conversation
🦋 Changeset detectedLatest commit: 26af835 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
1722937
to
4ce7648
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Great news! Jit hasn't found any security issues in your PR. Good Job! 🏆
4ce7648
to
a2d5cae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me!
return; | ||
} | ||
|
||
if (requestState.reason === 'token-not-active-yet') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use the enum here? Ref: https://github.com/clerkinc/javascript/blob/18d507e4d7c1dfed207ed21a4f86f19042a00a9a/packages/backend/src/tokens/errors.ts#L14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikosdouvlis I would have to import from the dist
, what's our stance on that?
import { TokenVerificationErrorReason } from '@clerk/backend/dist/types/tokens/errors';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the requestState.action: TokenVerificationErrorAction.EnsureClockSync
?
!snapshot |
Hey @brkalow - the snapshot version command generated the following package versions:
Tip: use the snippet copy button below to quickly install the required packages. # @clerk/backend
npm i @clerk/[email protected] # @clerk/chrome-extension
npm i @clerk/[email protected] # @clerk/clerk-js
npm i @clerk/[email protected] # eslint-config-custom
npm i [email protected] # @clerk/clerk-expo
npm i @clerk/[email protected] # @clerk/fastify
npm i @clerk/[email protected] # gatsby-plugin-clerk
npm i [email protected] # @clerk/localizations
npm i @clerk/[email protected] # @clerk/nextjs
npm i @clerk/[email protected] # @clerk/clerk-react
npm i @clerk/[email protected] # @clerk/remix
npm i @clerk/[email protected] # @clerk/clerk-sdk-node
npm i @clerk/[email protected] # @clerk/shared
npm i @clerk/[email protected] # @clerk/themes
npm i @clerk/[email protected] # @clerk/types
npm i @clerk/[email protected] |
This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Type of change
Packages affected
@clerk/clerk-js
@clerk/clerk-react
@clerk/nextjs
@clerk/remix
@clerk/types
@clerk/themes
@clerk/localizations
@clerk/clerk-expo
@clerk/backend
@clerk/clerk-sdk-node
@clerk/shared
@clerk/fastify
@clerk/chrome-extension
gatsby-plugin-clerk
build/tooling/chore
Description
npm test
runs as expected.npm run build
runs as expected.Attempt to detect clock skew in development based on the
requestState
. If detected, we log a helpful error message.Example output:
related to JS-675