```const identity = await ctx.auth.
isn't working for me. even when I am signed out, datas are being pushed to database, instead of throwing error
24 Replies
a little more context:
@Web Dev Cody mate i follow the exact procedure as you do, but its not producing same result
also, my code I probably do
I'm not sure if identity will return null or undefined if the user isn't logged in
I don't recall writing identity === null
you can view my code here: https://github.com/webdevcody/file-drive/blob/main/convex/files.ts#L16
GitHub
file-drive/convex/files.ts at main · webdevcody/file-drive
Contribute to webdevcody/file-drive development by creating an account on GitHub.
oh right you didn't do the null part. Actually, first I went with what you wrote, then since it didn't work, I went to convex docs and tried going through stuff and found the null part, yet it doesn't work

are you sure you are not logged in?
like console log what identity is
yeah I am not logged in, let me record a small clip
you just need to add console.log(identity) and tell me what it prints out
it doesn't print anything at all
here is the entire code
check the logs in the convex dashboard
or in your convex terminal
also check if convex is failing to build due to a typescript error or something
when I say "convex terminal", I mean go to vscode and click on your first terminal
i just did that and no error pops up or no identity is being logged
send me a screenshot of the terminal running npx convex dev
okay I really feel embarrassed to say this, but I hadn't run the npx convex dev command. Now that I run it, its working totally fine. Sorry mate for troubling you and thank you very much for helping me
I can't believe I forgot to run the command
no worries, simply mistake
glad you got it working!
Please help me in the file drive app with nextjs @Web Dev Cody I was following your video end to end but It's not working as expecting it to be. When I try to upload a file I am getting this :

these are the env variable I am using


Please help me @Web Dev Cody to fix this one
In this I am getting hasAccess value as null

@unknown double check the user you are logged in as has the orgs attached to their user info?
I am getting this in my identity object

I am logging in with my own gmail account and also I have added a oragnization on clerk as well
