-
Notifications
You must be signed in to change notification settings - Fork 36
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
Authentication: How would I getClient with Clerk? #123
Comments
ah -- just saw this: #103 |
Yes, but per request. Your |
Great, thanks for explaining. I'd appreciate some help here then. To be totally clear: If you're saying that I shouldn't pass in the cookie outside of makeClient, am I correct in reading that I should also not be setting the cookie with the new: If that's the case, then I'm also not clear how to get the jwt from inside of makeClient because I don't see how I can have access to any page, context or cookies there. |
No, you misread me:
|
wonderful. Thanks for clarifying how it should be organized. I'm in good shape now. |
Wondering if this looks fine to you (seems like it works for me), specifically for RSC. Thanks in advance!
|
@shawngustaw that looks good to me, but I have to admit that I am not familiar with your specific way of fetching the token. Glad to hear it works 😊 |
I'm only interested in the next js app folder approach at this point.
With Clerk for next.js app, I can get a token from a page, but I can't see how to get it from the environment like you do with the Next Auth approach #44
So I'd think I'd need to pass the token in with the getClient/registerApolloClient call in the examples,
export const { getClient } = registerApolloClient(() => {
but I don't see how to do that because the registerApolloClient doesn't take args.
Could you share how to get the client for an Clerk token?
I'm also curious -- where you've said in other posts that registerApolloClient is a singleton, is that also the case on the server only app folder approach? And if so, how does that work in a multi-user situation where each user has different creds?
The text was updated successfully, but these errors were encountered: