Also having an issue introducing ` clerk
Also having an issue introducing
@clerk/backend
lib to my app as it depends on node-fetch-native
.
16 Replies
I suppose I can make direct rest calls, but it would be great to have support for this lib @ian since Convex has more formal support for Clerk now.
@presley has been doing a lot of work on our bundler and node support lately, pinging him
I’m curious what you are using the backend package for. What calls do you want to make to Clerk?
And are you using this module from an action or from a query / mutation?
During a social signup routine, I need to injest profile fields from the newly created user that Clerk syncs to their user record from the federated provider.
Its from an action that gets scheduled by my
createUser
mutationGotcha, fields that aren’t available on the auth.getUserIdentity that are Clerk-specific?
uhh good question
You can customize which fields get passed into that object in the “claims” config
I'll look into that, but regardless, I imagine there will be other backend integrations I'd want with clerk in the future.
Just fyi, only fields that are part of the OpenID spec will make it through to our backend. But I get it- Clerk will likely provide APIs beyond what we could provide through the auth bit. I’ll let Presley talk to the bundling / dependency issue
first/last/email/avatar is what I'm interested in
Oh all those are already available. If avatar == profile picture
I think we list the claims to make in our Clerk docs
Anything beyond that I would want to fetch the oauth access token for the social provider and make calls to that API to enrich further. (tangible example of what I'd need backend access to clerk for)
https://clerk.com/docs/reference/backend-api/tag/Users#operation/GetOAuthAccessToken
Looking at the issue with the import
Thanks.
It looks like it worked with the
auth.getUserIdentity
, @ian, however, Clerk stores a very low res version of the profile picture, so I'll want to fetch the original image from the social provider.You should be able to use @clerk/backend now if you still need it. Sorry about the trouble. Let us know if you see any additional issues.
Thanks for the quick turn around @presley !