-
Notifications
You must be signed in to change notification settings - Fork 24
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
How to get session information? #47
Comments
My session only returns an abbreviated user object as depicted below but the readme says it will get a Clerk user object which contains a lot more properties such as organizationMembers + permissions. Anyone know how to get all these clerk user property values? session: {
userId: 'user_123',
claims: {
azp: 'http://localhost',
exp: 1716510495,
iat: 1716510435,
iss: 'https://grown-pug.clerk.accounts.dev',
nbf: 1716510425,
sid: 'sess_123',
sub: 'user_123'
}
} |
same here |
The readme is definitely not right from what I can tell. The server only validates the token, then includes the token info in locals. The backend doesn't seem to be creating a Clerk client, which seems like a requirement to get any user info. |
This PR in review but here's how to do it if it gets merged: <script lang="ts">
import { useClerkContext } from 'clerk-sveltekit/client'
const { session } = useClerkContext()
$: console.log($session)
</script> in server you can access the auth object in locals via |
Hi guys.
I'm new here and just started using sveltekit with combination of clerk, amazing library it's make me easy to use clerk and it's almost done, however i got some challenges in my project.
sorry if the questions is a newbie questions
how i can access the session and claims information?, i have setup it in my clerk app, but i keep got nothing
i also get some issues where in my terminal i get error where the cookies is there but the token is not active
The text was updated successfully, but these errors were encountered: