-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix(clerk): add alternative decoder #8642
Conversation
Co-authored-by: Charlie Ray <charlie@dsrecordings.com>
Co-authored-by: Charlie Ray <charlie@dsrecordings.com>
{ appMetadata: {}, roles: [] } It still feels like the template |
@jtoar We do not use |
* fix(clerk) add alternative decoder * Update packages/auth-providers/clerk/api/src/decoder.ts Co-authored-by: Charlie Ray <charlie@dsrecordings.com> * Update packages/auth-providers/clerk/api/src/decoder.ts Co-authored-by: Charlie Ray <charlie@dsrecordings.com> * add `id` for backwards compatibility * fix prettier error * extend type for jwt payload * simplify decoder * duplicate test for new decoder * fix set up notes * remove `parseJWT`; only return `id` in the template * lint fix * update docs * fix typos, add link * rename to clerkAuthDecoder --------- Co-authored-by: Charlie Ray <charlie@dsrecordings.com>
* fix(clerk) add alternative decoder * Update packages/auth-providers/clerk/api/src/decoder.ts Co-authored-by: Charlie Ray <charlie@dsrecordings.com> * Update packages/auth-providers/clerk/api/src/decoder.ts Co-authored-by: Charlie Ray <charlie@dsrecordings.com> * add `id` for backwards compatibility * fix prettier error * extend type for jwt payload * simplify decoder * duplicate test for new decoder * fix set up notes * remove `parseJWT`; only return `id` in the template * lint fix * update docs * fix typos, add link * rename to clerkAuthDecoder --------- Co-authored-by: Charlie Ray <charlie@dsrecordings.com>
* fix(clerk) add alternative decoder * Update packages/auth-providers/clerk/api/src/decoder.ts Co-authored-by: Charlie Ray <charlie@dsrecordings.com> * Update packages/auth-providers/clerk/api/src/decoder.ts Co-authored-by: Charlie Ray <charlie@dsrecordings.com> * add `id` for backwards compatibility * fix prettier error * extend type for jwt payload * simplify decoder * duplicate test for new decoder * fix set up notes * remove `parseJWT`; only return `id` in the template * lint fix * update docs * fix typos, add link * rename to clerkAuthDecoder --------- Co-authored-by: Charlie Ray <charlie@dsrecordings.com>
…ace-svg-as-components * 'main' of github.com:redwoodjs/redwood: (25 commits) fix(deps): update dependency @whatwg-node/fetch to v0.9.7 (redwoodjs#8702) fix(deps): update dependency @heroicons/react to v2.0.18 (redwoodjs#8701) fix(deps): update dependency @headlessui/react to v1.7.15 (redwoodjs#8700) fix(deps): update dependency webpack to v5.88.0 (redwoodjs#8697) fix(deps): update dependency @graphiql/toolkit to v0.8.4 (redwoodjs#8698) fix(deps): update dependency react-error-boundary to v4.0.10 (redwoodjs#8693) Rename cache file (redwoodjs#8699) fix(clerk): add alternative decoder (redwoodjs#8642) fix(deps): update dependency @vitejs/plugin-react to v4.0.1 (redwoodjs#8692) chore(deps): update dependency @simplewebauthn/server to v7.3.1 (redwoodjs#8690) chore(rwfw): Add force optimise to vite.config when running project:sync (redwoodjs#8688) fix(deps): update storybook monorepo to v7.0.23 (redwoodjs#8696) fix(deps): update dependency react-toastify to v9.1.3 (redwoodjs#8694) fix(deps): update prisma monorepo to v4.16.1 (redwoodjs#8695) Mark broken gql prerender test as slow (redwoodjs#8687) fix(deps): update dependency @graphiql/plugin-explorer to v0.1.20 (redwoodjs#8691) fix(deps): update typescript-eslint monorepo to v5.60.0 (redwoodjs#8660) fix(deps): update dependency @fastify/http-proxy to v9.2.1 (redwoodjs#8680) chore(deps): update dependency vite to v4.3.9 (redwoodjs#8682) fix(deps): update prisma monorepo to v4.16.0 (redwoodjs#8684) ...
Working fix for #8641. This is a work in progress; I haven't tested it yet, I just want to get the conversation started. @asher-eastham, @o0charlie0o, would love your input here. @asher-eastham I think what I'm proposing here is along the lines of what I suggested to you, but curious to know how much your implementation ended up differing?
I know the existing
authDecoder
needs to go, but removing that would be breaking. What if we mark it as deprecated, add a new authDecoder (right now namedjwtAuthDecoder
, but open to suggestions), configure theyarn rw setup auth clerk
command to use that decoder instead, and in the release notes, I'll recommend everyone use Clerk use the new decoder?