-
Notifications
You must be signed in to change notification settings - Fork 991
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(clerk auth): make getToken
options globally configurable
#7947
Conversation
Great work on this @jtoar! A third option here would be to have the users give the full Whatever we choose, I think we should only choose one. If we go with what's currently called Actually, having written all the above, maybe we should just name it But the easier option, both for us and for our users right now is of course to make it possible to pass in default options. So maybe we should go with that for now, and switch over to the other, more powerful, alternative when someone actually needs it. |
Thanks @Tobbe, and sounds good, I've reduced the PR to just the |
* feat(clerk auth): make getToken configurable * go with defaultGetTokenOptions --------- Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com>
* feat(clerk auth): make getToken configurable * go with defaultGetTokenOptions --------- Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com>
* 'main' of github.com:redwoodjs/redwood: (66 commits) update template README bumps API build target 16.20; fixtures updated (redwoodjs#7995) remove serverless deploy option (redwoodjs#7993) chore(deps): update dependency @clerk/types to v3.33.0 (redwoodjs#7991) feat(clerk auth): make `getToken` options globally configurable (redwoodjs#7947) chore(deps): update dependency firebase to v9.19.1 (redwoodjs#7986) fix(deps): update dependency webpack-dev-server to v4.13.2 (redwoodjs#7989) fix(deps): update dependency @clerk/clerk-sdk-node to v4.8.1 (redwoodjs#7988) fix upgrade.js error message (redwoodjs#7992) fix(clerk auth): set auth state to loading while reauthenticating (redwoodjs#7852) chore(deps): update dependency @supabase/supabase-js to v2.13.1 (redwoodjs#7981) chore(deps): update dependency @clerk/clerk-react to v4.14.1 (redwoodjs#7987) chore: unpublish packages script (redwoodjs#7990) chore(deps): update dependency nx to v15.9.2 (redwoodjs#7983) chore(deps): update dependency @nrwl/nx-cloud to v15.3.5 (redwoodjs#7985) fix(deps): update dependency @apollo/client to v3.7.11 (redwoodjs#7984) chore(deps): update dependency @tsd/typescript to v5.0.3 (redwoodjs#7978) chore(deps): update dependency typescript to v5.0.3 (redwoodjs#7972) chore(deps): update dependency @nrwl/nx-cloud to v15.3.4 (redwoodjs#7977) chore(deps): update dependency nx to v15.9.1 (redwoodjs#7976) ...
…oodjs#7947) * feat(clerk auth): make getToken configurable * go with defaultGetTokenOptions --------- Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com>
Clerk users need to be able to configure how the auth provider calls
getToken
so that it always uses certain options. As far as I could tell this isn't possible right now. This PR suggests two different ways of doing it. Maybe we'll go with just one, or both, or neither, but it's important to at least get an RC out so that users can also tell us which solution they like.The idea in this PR is that users could either provide a wrapper for
getToken
, or pass default options: